Files
homelab-docker-stacks/nginx/compose.yaml
T

50 lines
1.1 KiB
YAML

name: nginx
services:
nginx:
image: nginx:1-alpine
container_name: nginx
volumes:
- /srv/data/nginx/templates:/etc/nginx/templates:ro
- /srv/data/nginx/certs:/etc/nginx/certs:ro
environment:
BASE_DOMAIN: ${BASE_DOMAIN}
NGINX_ENVSUBST_OUTPUT_DIR: /etc/nginx
ports:
- "192.168.10.101:80:80"
- "192.168.10.101:443:443"
- "[::]:50443:443"
networks:
- proxy
restart: unless-stopped
deploy:
resources:
limits:
cpus: "0.5"
memory: 256M
reservations:
cpus: "0.05"
memory: 16M
acme-sh:
image: neilpang/acme.sh:3.1.4
container_name: acme.sh
volumes:
- /srv/data/nginx/acme-sh:/acme.sh
- /srv/data/nginx/certs:/certs
- /var/run/docker.sock:/var/run/docker.sock
environment:
CF_Token: ${CF_TOKEN}
CF_Zone_ID: ${CF_ZONE_ID}
command: daemon
restart: unless-stopped
deploy:
resources:
limits:
cpus: "0.2"
memory: 64M
reservations:
cpus: "0.05"
memory: 16M
networks:
proxy:
external: true