services: traefik: image: traefik:v3.2 container_name: traefik restart: unless-stopped ports: - "80:80" - "443:443" environment: - CF_DNS_API_TOKEN=${CF_DNS_API_TOKEN} - DOCKER_API_VERSION=1.41 volumes: - /var/run/docker.sock:/var/run/docker.sock:ro - ./config/traefik.yaml:/traefik.yaml:ro - ./config/dynamic:/dynamic:ro - ./data/acme.json:/acme.json - ./data/traefik-users:/auth/traefik-users:ro networks: - proxy labels: - "traefik.enable=true" - "traefik.http.routers.traefik-dashboard.rule=Host(`traefik.${DOMAIN}`)" - "traefik.http.routers.traefik-dashboard.entrypoints=websecure" - "traefik.http.routers.traefik-dashboard.tls=true" - "traefik.http.routers.traefik-dashboard.tls.certresolver=cloudflare" - "traefik.http.routers.traefik-dashboard.service=api@internal" - "traefik.http.routers.traefik-dashboard.middlewares=traefik-auth@file" networks: proxy: external: true