Traefik
Traefik: a first setup, important settings, verification, and recovery considerations.
Working directory: ~/homelab/core/gateway. Follow the common setup workflow first. This is a setup note based on the linked documentation, not a copy of my live configuration or a runtime verification of this full stack.
Start here
The runnable example is in the practice lab. Traefik receives a request on an entry point, matches a router rule, and forwards it to a service. This example uses the file provider, so it needs no Docker socket or automatic discovery of other projects.
Settings and data
Read core/gateway/routes.yaml: Host(`lab.test`) selects the practice router and http://web:8080 is its backend. The static Compose arguments define listening ports and the file-provider path. The dashboard is disabled. Only the example HTTP port is published to loopback.
Check it
Use the two hostname tests and the stopped-backend exercise. Observe the difference between an unmatched route and an unavailable application. Restore the web service and confirm a successful response.
When something fails
If a file edit is not reflected, validate YAML and inspect provider errors. A single-file bind mount may retain an old inode when an editor replaces a file; recreate the practice gateway if needed. Real HTTPS also requires certificate handling and correct proxy trust. Never fix certificate failures by globally disabling verification. Keep private route files out of public examples.
Run this only after the setup above, from its project directory:
sudo docker compose logs --tail 30 gateway