Update compose.yaml

This commit is contained in:
2026-01-30 22:21:46 -08:00
parent d17d8885af
commit 479656a6fd

View File

@@ -1,9 +1,6 @@
services: services:
traefik: traefik:
image: traefik:v2.11 image: traefik:v2.11
#container_name: traefik
deploy:
restart: unless-stopped
command: command:
# Providers # Providers
@@ -29,13 +26,20 @@ services:
- "443:443" - "443:443"
volumes: volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro" - /var/run/docker.sock:/var/run/docker.sock:ro
- "./letsencrypt:/letsencrypt" - ./letsencrypt:/letsencrypt
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: any
placement:
constraints:
- node.role == manager
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
# Dashboard route (secure this in real setups!)
- "traefik.http.routers.traefik.rule=Host(`traefik.example.com`)" - "traefik.http.routers.traefik.rule=Host(`traefik.example.com`)"
- "traefik.http.routers.traefik.entrypoints=websecure" - "traefik.http.routers.traefik.entrypoints=websecure"
- "traefik.http.routers.traefik.tls.certresolver=le" - "traefik.http.routers.traefik.tls.certresolver=le"