writing-skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
in Docker Compose with `$`\n\n## Service Configuration\n- `loadbalancer.server.port` when container exposes multiple — Traefik can't guess\n- Health check: `healthcheck.path=/health` — removes unhealthy from rotation\n- Sticky sessions: `loadbalancer.sticky.cookie.name=srv_id` — for stateful apps\n\n## Common Mistakes\n- Router without entryPoint — defaults may not be what you expect\n- Forgetting `traefik.docker.network` with multiple networks — Traefik picks wrong one\n- ACME storage not persisted — certificates regenerated, hits rate limit\n- Dashboard exposed without auth — `api.insecure=true` is dangerous in production\n- PathPrefix without StripPrefix — backend receives full path, may 404\n- Services on different ports — each needs explicit port label\n\n## File Provider\n- `watch=true` for hot reload — otherwise restart Traefik on changes\n- Can coexist with Docker provider — useful for external services\n- Define routers, services, middlewares in YAML — same concepts as labels\n\n## Debugging\n- `--log.level=DEBUG` for troubleshooting — verbose but helpful\n- Dashboard shows routers, services, middlewares — verify configuration\n- `--api.insecure=true` for local dev only — secure with auth in production\n","licenseDocuments":[]}}
TraefikAvoid common Traefik mistakes — router priority, TLS configuration, Docker labels syntax, and middleware ordering.
Independent GitHub snapshot · Automated classification · Original documentation governs
rule AND service — missing either = not workingpriority to overrideHost() is case-insensitive — Host(\example.com`)` matches Example.comHost(\a.com`) || Host(`b.com`)` — OR logicdeploy.labels for SwarmHost(\example.com`)` with escapingtraefik.enable=true — if exposedByDefault=falsetraefik.http.services.myservice.loadbalancer.server.port=80websecure needs TLS config — otherwise plain HTTP on 443certificatesResolvers.myresolver.acme.email required — registration fails withouttls=true on router activates TLS — tls.certresolver=myresolver for auto-certcaServer to staging URL, avoids rate limits--entrypoints.web.address=:80entryPoints=web,websecure — comma-separated listmiddlewares=auth,compressstripPrefix, redirectScheme, basicAuth, rateLimithtpasswd format — escape $ in Docker Compose with $loadbalancer.server.port when container exposes multiple — Traefik can't guesshealthcheck.path=/health — removes unhealthy from rotationloadbalancer.sticky.cookie.name=srv_id — for stateful appstraefik.docker.network with multiple networks — Traefik picks wrong oneapi.insecure=true is dangerous in productionwatch=true for hot reload — otherwise restart Traefik on changes--log.level=DEBUG for troubleshooting — verbose but helpful--api.insecure=true for local dev only — secure with auth in production