Traefik automatically discovers Docker containers and configures routing and SSL certificates dynamically.
Deploy Traefik
docker network create traefik-proxy
docker run -d -p 80:80 -p 443:443 -v /var/run/docker.sock:/var/run/docker.sock:ro -v traefik-certs:/certs traefik:v3.0 --providers.docker=true --entrypoints.web.address=:80 --entrypoints.websecure.address=:443 --certificatesresolvers.letsencrypt.acme.email=admin@yourdomain.com --certificatesresolvers.letsencrypt.acme.storage=/certs/acme.json
Deploy App with Labels
labels:
- "traefik.enable=true"
- "traefik.http.routers.myapp.rule=Host('app.yourdomain.com')"
- "traefik.http.routers.myapp.tls.certresolver=letsencrypt"
Conclusion
Traefik eliminates manual reverse proxy configuration for Docker. Our team deploys Traefik and container infrastructure.
Comments