miniNAS/docker_compose/nginx.yml

52 lines
1.2 KiB
YAML
Raw Normal View History

2021-12-26 16:23:16 +01:00
version: "2"
services:
nginx:
restart: always
image: nginx
container_name: nginx
ports:
- "80:80"
- "443:443"
- "3000:3000"
- "2222:2222"
volumes:
- "/etc/nginx/conf.d"
- "/etc/nginx/vhost.d"
- "/usr/share/nginx/html"
- "$CERTS_DIR:/etc/nginx/certs:ro"
networks:
- default
2021-12-26 16:23:16 +01:00
nginx-gen:
restart: always
image: jwilder/docker-gen
container_name: nginx-gen
volumes:
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "$NGINX_TMPL:/etc/docker-gen/templates/nginx.tmpl:ro"
volumes_from:
- nginx
entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
networks:
- default
2021-12-26 16:23:16 +01:00
letsencrypt-nginx-proxy-companion:
restart: always
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt-nginx-proxy-companion
volumes_from:
- nginx
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "$CERTS_DIR:/etc/nginx/certs:rw"
environment:
- NGINX_DOCKER_GEN_CONTAINER=nginx-gen
networks:
- default
2021-12-26 16:23:16 +01:00
networks:
default:
external:
name: $SERVER_DOCKER_NETWORKNAME