nginx-proxy/docker-compose.yml

34 lines
722 B
YAML

version: "2"
services:
nginx:
image: nginx
container_name: nginx_proxy
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- /var/www
- /etc/nginx/conf.d
- /etc/letsencrypt:/etc/letsencrypt:ro
- ./vhost.d:/etc/nginx/vhost.d:ro
dockergen:
image: jwilder/docker-gen:latest
restart: always
depends_on:
- nginx
command: -notify-sighup nginx_proxy -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
volumes_from:
- nginx
volumes:
- ./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
default:
name: nginxproxy
external: true