--- services: traefik: image: docker.io/library/traefik:v3.1.6 container_name: traefik ports: - 80:80 - 443:443 # -- (Optional) Enable Dashboard, don't do in production # - 8080:8080 volumes: - /run/docker.sock:/run/docker.sock:ro - ./config/traefik.yaml:/etc/traefik/traefik.yaml:ro - ./config/conf.d/:/etc/traefik/conf.d/:ro - ./data/certs/:/var/traefik/certs/:rw # -- (Optional) When using Cloudflare as Cert Resolver # environment: # - CF_DNS_API_TOKEN=your-cloudflare-api-token # -- (Optional) When using a custom network # networks: # - your-traefik-network restart: unless-stopped # -- (Optional) When using a custom network # networks: # your-traefik-network: # external: true