version: '3' services: reverse: image: nginx labels: com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true" container_name: reverse restart: unless-stopped ports: - "80:80" - "443:443" volumes: - ./conf.d:/etc/nginx/conf.d - ./vhost.d:/etc/nginx/vhost.d - ./html:/usr/share/nginx/html - ./certs:/etc/nginx/certs:ro reverse-gen: image: jwilder/docker-gen command: -notify-sighup reverse -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf container_name: reverse-gen restart: unless-stopped volumes: - ./conf.d:/etc/nginx/conf.d - ./vhost.d:/etc/nginx/vhost.d - ./html:/usr/share/nginx/html - ./certs:/etc/nginx/certs:ro - /var/run/docker.sock:/tmp/docker.sock:ro - ./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro reverse-letsencrypt: image: jrcs/letsencrypt-nginx-proxy-companion container_name: reverse-letsencrypt restart: unless-stopped volumes: - ./conf.d:/etc/nginx/conf.d - ./vhost.d:/etc/nginx/vhost.d - ./html:/usr/share/nginx/html - ./certs:/etc/nginx/certs:rw - /var/run/docker.sock:/var/run/docker.sock:ro environment: NGINX_DOCKER_GEN_CONTAINER: "reverse-gen" NGINX_PROXY_CONTAINER: "reverse" networks: default: external: name: reverse-proxy