Managing the Entrypoint
Traefik is the edge router of my homelab. It's the first service to handle incoming requests on ports 80 and 443, managing HTTPS certificates via Let's Encrypt and routing traffic based on Docker labels.
Deployment
It maps the Docker socket to discover new containers automatically. This makes adding new services as simple as adding labels to a docker-compose.yml file.
services:
traefik:
image: traefik:latest
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "./letsencrypt:/letsencrypt"
Purpose
It eliminates the need for manual Nginx proxy configurations, creating a "set and forget" infrastructure for internal routing.