Proxy during discourse bootstrap

Hello,

I was trying to bootstrap while relying on an outbound http proxy, but the bootstrapping script didn’t honor the proxy settings. I created the following file to tell docker to use the a proxy:

$ cat /etc/systemd/system/docker.service.d/docker-http-proxy.conf
[Service]
Environment="HTTP_PROXY=http://proxy.example.com:8118" "NO_PROXY=localhost,127.0.0.1"

This allowed the first steps in the bootstrapping to succeed, but the bootstrapping failed when it tried to clone pups.git from github.com. Due to the locally enforced firewall, the connection to github.com was refused.

I’m pretty sure that I had the HTTP_PROXY environment variable and the system-wide git configuration set too.

I’ve since opened up http/s outbound ports, but was hoping that I could bootstrap in a somewhat more restricted environment. Any thoughts about how to encourage the bootstrapping process to use an http proxy?

Thanks,
Andrew

1 Like

Apparently this has happened before. Install discourse with internet access only via proxy

2 Likes

If you’re stuck on bootstrapping with the proxy method, I’ve had good success with the cached install method that requires no internet at all on the machine you’re installing on: How to install Discourse on an isolated CentOS 7 server

It works the same on any linux distribution that can run a recent version of docker.
I recommend creating a shell script for the git clone steps to save a lot of time when it’s time to update the caches, and to make sure you update everything at the same time.
It quickly becomes a mess if you forget to keep all your plugins in sync with the base discourse.

1 Like