- Notifications
You must be signed in to change notification settings - Fork3.1k
support nginx_* env variables on nginx container and vhosts#1326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
pnbecker commentedOct 14, 2019
I like this PR and think it would be a helpful addition. |
While we are waiting for this to be merged, you can use updated docker-gen from the repopoma/docker-gen that already contains this PR |
Rebased PR onto the current master, now also supports upper case "NGINX_*" env vars. One problem I've encountered is that some containers export export "NGINX_*" env vars that are invalid in the context of nginx conf and this might lead to broken nginx config generation. Notably |
Uh oh!
There was an error while loading.Please reload this page.
Implementation of#1324 feature request. Environment variables starting with
nginx_*
are added as nginx config statements, for example:nginx_client_max_body_size=30M
. Variables of jwilder/nginx-proxy container are added to the global config, and variables on others containers are added to the respective vhosts.Example
docker-compose.yml
:Currently only lower case variables are supported (untilnginx-proxy/docker-gen#306 is merged). Also if there is an easy way to merge
Env
dicts from all containers with the same vhost, we should do that, currentlyEnv
map is taken from the first container for each vhost.