miniNAS/docker_compose/nginx.yml

40 lines
874 B
YAML
Raw Normal View History

2021-12-26 16:23:16 +01:00
version: "2"
services:
nginx:
restart: always
image: nginxproxy/nginx-proxy:latest
container_name: nginx-proxy
2021-12-26 16:23:16 +01:00
ports:
- "80:80"
- "443:443"
volumes:
- "/etc/nginx/vhost.d"
- "/usr/share/nginx/html"
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "$CERTS_DIR:/etc/nginx/certs:ro"
- "$NGINX_CONF_DIR:/etc/nginx/conf.d"
2021-12-26 16:23:16 +01:00
acme-companion:
2021-12-26 16:23:16 +01:00
restart: always
image: nginxproxy/acme-companion:latest
container_name: acme-companion
2021-12-26 16:23:16 +01:00
volumes_from:
- nginx
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "$CERTS_DIR:/etc/nginx/certs:rw"
- "$ACME_SH_DIR:/etc/acme.sh"
2021-12-26 16:23:16 +01:00
environment:
- NGINX_DOCKER_GEN_CONTAINER=nginx-gen
depends_on:
- nginx
networks:
- default
2021-12-26 16:23:16 +01:00
networks:
default:
external:
name: $SERVER_DOCKER_NETWORKNAME