mirror of
https://github.com/thib8956/nginx-proxy
synced 2024-11-24 21:06:31 +00:00
5f684d4fc5
Demonstrate that this pattern works. This is based on the example at <https://github.com/fatk/docker-letsencrypt-nginx-proxy-companion-examples/blob/master/docker-compose/v2/simple-site/docker-compose.yml>.
34 lines
677 B
YAML
34 lines
677 B
YAML
version: '2'
|
|
services:
|
|
nginx:
|
|
image: nginx
|
|
container_name: nginx
|
|
ports:
|
|
- "80:80"
|
|
volumes:
|
|
- /etc/nginx/conf.d
|
|
networks:
|
|
- proxy-tier
|
|
|
|
dockergen:
|
|
image: jwilder/docker-gen
|
|
command: -notify-sighup nginx -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
|
|
volumes_from:
|
|
- nginx
|
|
volumes:
|
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
|
- ./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl
|
|
networks:
|
|
- proxy-tier
|
|
|
|
whoami:
|
|
image: jwilder/whoami
|
|
environment:
|
|
- VIRTUAL_HOST=whoami.local
|
|
networks:
|
|
- proxy-tier
|
|
|
|
networks:
|
|
proxy-tier:
|
|
driver: bridge
|