A Traefik router matches an incoming request and selects a target service. HTTP rules can match hostnames, paths, or path prefixes. section 20.4
A practical Traefik route connects:
- An entrypoint, such as HTTP port 80 or HTTPS port 443. section 20.4
- A router rule, such as Host(`whoami.local`). section 20.4
- A service, which forwards traffic to the application container. section 20.4
- Optional middleware, which can change paths or headers or enforce authentication. section 20.4
Route a container with labels
Enable Traefik and define the hostname rule on the service: traefik.enable=true and traefik.http.routers.whoami.rule=Host(`whoami.local`). Set the upstream port, start the Compose deployment, then verify with curl -i http://whoami.local.





















