Всем привет
Для запуска команды ./launcher rebuild app я использую прокси, чтобы корректно загружать код с GitHub.
env:
LANG: en_US.UTF-8
DISCOURSE_DEFAULT_LOCALE: zh_CN
HTTP_PROXY: http://10.27.xxx.xxx:7890
HTTPS_PROXY: http://10.27.xxx..xx:7890
Однако при запуске моего сайта функция входа через GitHub не работает. Мне приходится запускать локальный прокси, чтобы исправить это.
Как можно убрать переменные окружения http_proxy и https_proxy для запущенного сайта?
Есть ли какие-либо команды, подобные приведённым ниже, которые помогут решить эту проблему?
./launcher enter app
// удалить переменные окружения
./launcher start app
Буду признателен за любую помощь.
Спасибо.
1 лайк
pfaffman
(Jay Pfaffman)
18.Декабрь.2021 09:52:26
2
Maybe if you bootstrap, then edit the app.yml, then start.
Also there is a command line option --docker-args. There might be a way to pass something there when you bootstrap.
1 лайк
Can I run ./launcher start app --docker-args ?
1 лайк
pfaffman
(Jay Pfaffman)
18.Декабрь.2021 11:51:54
4
Yes. You can. It’s a shell script and you can look at it. There is some documentation at the top of the file. But I pass docker args to launcher start to add stuff to get it to work with traefik.
1 лайк
thanks, Jay, But I still can’t get rid of the effect caused by
./launcher rebuild app --docker-args="--net=host --env https_proxy=http://127.0.0.1:7890"
I need something to remove the proxy settings when I restart my app like this:
./launcher start app --docker-args="--net=host --removeEnv" //removeEnv is not a valid command, I only use this for illustration purpose
pfaffman
(Jay Pfaffman)
19.Декабрь.2021 09:05:53
6
Have your tried changing the env settings in the yml file begotten /between the bootstrap and start?
Yes, but it doesn’t work, so I tried not to mess with the app.yml and use --docker-args to pass the GFW.
When I try to login with Github auth, it turns out that the request pass through the proxy address which is not what I expected.
BTW: my site is emacs-china.org , you can reproduce the issue with Github auth.
Thanks.
Finally, I got it working.
edit container/app.yml, remove http_proxy
./launcher destroy app
./launcher start app
./launcher destroy app could remove the docker env settings in most situation.
3 лайка
michaeld
(Michael - Communiteq)
26.Декабрь.2021 06:31:25
9
Out of curiosity: What were you expecting? Isn’t that what HTTP_PROXY is supposed to do?
1 лайк