feat: Providing env vars for dockergen and nginx

This commit is contained in:
Martin Reinhardt 2022-11-02 06:28:52 +01:00
parent c4ad18fecc
commit aa4ee24b77
No known key found for this signature in database
GPG key ID: C7AEEC5A5D894E77
2 changed files with 10 additions and 6 deletions

View file

@ -466,6 +466,10 @@ By default the nginx configuration `upstream` blocks will use this block's corre
Please note that using regular expressions in `VIRTUAL_HOST` will always result in a corresponding `upstream` block with an SHA1 name.
#### Further customization
You can use the environment variables `${DOCKERGEN_ARGS}` and `${NGINX_ARGS}` to pass further commands to dockergen or nginx, e.g. for debugging.
### Troubleshooting
In case you can't access your VIRTUAL_HOST, set `DEBUG=true` in the client container's environment and have a look at the generated nginx configuration file `/etc/nginx/conf.d/default.conf`:

View file

@ -1,2 +1,2 @@
dockergen: docker-gen -watch -notify "nginx -s reload" /app/nginx.tmpl /etc/nginx/conf.d/default.conf
nginx: nginx
dockergen: docker-gen -watch -notify "nginx -s reload" ${DOCKERGEN_ARGS} /app/nginx.tmpl /etc/nginx/conf.d/default.conf
nginx: nginx ${NGINX_ARGS}