Open aminvakil opened 2 years ago
OK, so as nginx.conf
is mounted read-only on nginx, there isn't anything that could be done now after container is up (look-up a variable and change configuration according to it).
Now we should either remove read_only: true
line from docker-compose
or ...?
there isn't anything that could be done now after container is up
Why does there need to be? Won't people stop and restart containers while upgrading?
Sorry I should have been clearer. I didn't find an environment variable which can be set in nginx.conf
so that it sets access.log
on or off, so I was more thinking of a sed
in docker-compose command
so it can change the line configuring access.log
if it was set to be off.
So anyone can change a variable in .env
or .env.custom
and it gets done, not to force users to change nginx.conf
manually.
see "Using environment variables in nginx configuration (new in 1.19)"
nginx entrypoint supports envsubst:
Problem Statement
Official guidelines suggests and everyone in production uses a reverse proxy in front of sentry nginx (I guess), and logging should be done on the proxy instead of on docker IMO, so I'm not sure if logging in nginx container again is useful (unless on debugging).
Solution Brainstorm
Add a variable to disable nginx logging in container (which is enabled by default).