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

64 lines
1.5 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"
- "[::]:18443:443"
networks:
proxy:
host-access:
ipv4_address: 172.31.255.2
extra_hosts:
- "host.internal:172.31.255.1"
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
host-access:
name: host-access
driver: bridge
driver_opts:
com.docker.network.bridge.name: br-host-access
internal: true
ipam:
config:
- subnet: 172.31.255.0/29
gateway: 172.31.255.1