nginx-proxy-auto-docker/docker-compose-separate-containers.yml

25 lines
579 B
YAML

version: '2.1'
services:
nginx:
image: nginx
container_name: nginx
ports:
- "80:80"
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
whoami:
image: jwilder/whoami
environment:
- VIRTUAL_HOST=whoami.local
volumes:
nginx_conf: {}