nginx-proxy-auto-docker/test/test_dockergen_v3/test_dockergen_v3.yml
Thomas LEVEIL 5c2f50402a fix template when running docker-gen and nginx in separate containers
Since commit 658e20f, the template makes the assumption that the container running docker-gen is the container running nginx while checking that upstream containers are reachable.
By introducint the `NGINX_CONTAINER` environment variable, users are now able to indicate which container is actually running nginx when running docker-gen and nginx in separated containers.
2017-03-08 21:32:54 +01:00

28 lines
No EOL
625 B
YAML

version: '3'
services:
nginx:
image: nginx
container_name: nginx
volumes:
- nginx_conf:/etc/nginx/conf.d
dockergen:
image: jwilder/docker-gen
command: -notify-sighup nginx -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ../nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl
- nginx_conf:/etc/nginx/conf.d
web:
image: web
container_name: whoami
expose:
- "80"
environment:
WEB_PORTS: 80
VIRTUAL_HOST: whoami.nginx.container.docker
volumes:
nginx_conf: {}