Files
homelab/traefik-docker-compose.yaml
T

39 lines
1.3 KiB
YAML

services:
traefik:
image: traefik:v3.5
container_name: traefik
restart: unless-stopped
command:
- "--api.insecure=false"
- "--api.dashboard=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.network=traefik-proxy"
- "--entryPoints.web.address=:80"
- "--entryPoints.websecure.address=:443"
- "--entryPoints.websecure.http.tls=true"
- "--entryPoints.web.http.redirections.entryPoint.to=websecure"
- "--entryPoints.web.http.redirections.entryPoint.scheme=https"
- "--serversTransport.insecureSkipVerify=true"
- "--providers.file.directory=/etc/traefik/dynamic"
- "--providers.file.watch=true"
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.rule=Host(`traefik.workstation`)"
- "traefik.http.routers.traefik.entrypoints=websecure"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.routers.traefik.tls=true"
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik/certs:/certs:ro
- ./traefik/dynamic:/etc/traefik/dynamic:ro
networks:
- traefik-proxy
networks:
traefik-proxy:
external: true