-
-
Notifications
You must be signed in to change notification settings - Fork 220
Document self-hosted installation behind a proxy #622
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
I considered putting this in "Releases & Upgrades" but it's more about installation. I also considered giving it a separate page like we do for other configs, but it's really about install-time vs. run-time config. |
emmatyping
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text and content LGTM. I made 3 minor suggestions.
BYK
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Ethan Smith <[email protected]>
|
Merged! Thanks for the contribution @goganchic! |
aminvakil
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I've been late to party!
|
|
||
| Here are the steps to follow: | ||
|
|
||
| 1. Set `http_proxy`, `https_proxy` and `no_proxy` variables in the `/etc/environment` file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really a necessity?
We're using http proxy in some of our servers which are using docker and we have only changed docker systemd file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you change systemd file - it makes docker daemon to use proxy for docker pull. When you config proxy in .docker/config.json - it makes docker to set env proxy variables during docker run. /etc/environment file is required for docker build, so without it this code fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I didn't know that docker build is different, thanks!
https://github.com/getsentry/self-hosted/blob/e028a5ed52f835ef2fefcab0104ff047889e5470/install/build-docker-images.sh#L6 :
$dc build --build-arg "http_proxy=${http_proxy:-}" --build-arg "https_proxy=${https_proxy:-}" --build-arg "no_proxy=${no_proxy:-}" --force-rm web
So if changing /etc/environment is necessary why are we passing these build arguments to docker build and if we are passing these build arguments to docker build why we need to change /etc/environment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/etc/environment provide env variables for shell and the command $dc build --build-arg "http_proxy=${http_proxy:-}" --build-arg "https_proxy=${https_proxy:-}" --build-arg "no_proxy=${no_proxy:-}" --force-rm web passes this variables to docker build. But actually we can remove all --build-arg from docker build and remove proxy args from https://github.com/getsentry/self-hosted/blob/e028a5ed52f835ef2fefcab0104ff047889e5470/install/install-wal2json.sh#L10, because ./docker/config.json does all required things. Actually we don't need /etc/environment, we need only ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the documentation to go with getsentry/self-hosted#1543. I pulled it from getsentry/self-hosted@ee2be46 and edited it somewhat.
cc: @goganchic @BYK @aminvakil