Files
docker-trocheserver/nginx-proxy/config/docker-compose.yml
2021-09-16 13:23:36 +02:00

49 lines
1.7 KiB
YAML

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