We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It appears that the docker-gen container does not "see" or respect environment variables set by docker-compose. Here is my docker-gen service:
docker-gen: image: jwilder/docker-gen container_name: docker-gen command: -notify-sighup nginx-proxy -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf depends_on: - nginx-proxy volumes: - ../certs:/etc/nginx/certs:ro - ./docker-gen/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl - /var/run/docker.sock:/tmp/docker.sock - nginx-proxy-conf:/etc/nginx/conf.d - nginx-proxy-vhosts:/etc/nginx/vhost.d environment: - DEFAULT_HOST=foo.bar - FOO=bar
However, neither FOO nor (more importantly) DEFAULT_HOST are respected as environment variables within the docker-gen container.
This in turn causes the default_server option not to be set when generating default.conf from the nginx.tmpl of nginx-proxy:
{ $default_host := or ($.Env.DEFAULT_HOST) "" }} {{ $default_server := index (dict $host "" $default_host "default_server") $host }}
...
server { server_name {{ $host }}; listen 443 ssl http2 {{ $default_server }};
and I need that to be set for proper security.
Please help!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It appears that the docker-gen container does not "see" or respect environment variables set by docker-compose. Here is my docker-gen service:
However, neither FOO nor (more importantly) DEFAULT_HOST are respected as environment variables within the docker-gen container.
This in turn causes the default_server option not to be set when generating default.conf from the nginx.tmpl of nginx-proxy:
...
and I need that to be set for proper security.
Please help!
The text was updated successfully, but these errors were encountered: