38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
|
|
services:
|
|
nginx:
|
|
image: nginx:latest
|
|
networks:
|
|
- traefik_traefik_proxy
|
|
deploy:
|
|
mode: replicated
|
|
replicas: 8
|
|
restart_policy:
|
|
condition: on-failure
|
|
labels:
|
|
# Enable Service discovery for Traefik
|
|
- "traefik.enable=true"
|
|
# Define the nginx router rule
|
|
- "traefik.http.routers.nginx.rule=Host(`nginx.lan.xbazzi.com`)"
|
|
# Expose nginx on the HTTPS entrypoint
|
|
- "traefik.http.routers.nginx.entrypoints=websecure"
|
|
# - "traefik.http.routers.nginx.entrypoints=web"
|
|
# Enable TLS
|
|
- "traefik.http.routers.nginx.tls=true"
|
|
# - "traefik.http.routers.nginx.tls=false"
|
|
# Expose the nginx port number to Traefik
|
|
- "traefik.http.services.nginx.loadbalancer.server.port=80"
|
|
|
|
# Custom labels
|
|
- "com.xbazzi.stack=nginx"
|
|
- "com.xbazzi.critical=false"
|
|
placement:
|
|
constraints:
|
|
- node.labels.zone == core
|
|
# - node.role != manager
|
|
# - node.labels.type != db
|
|
|
|
networks:
|
|
traefik_traefik_proxy:
|
|
external: true
|