Files
Docker-Compose/Proxy_Containers/traefik/compose.yaml
T

39 lines
1.4 KiB
YAML
Raw Normal View History

2026-02-07 17:50:36 +00:00
services:
traefik:
image: traefik:latest
container_name: traefik
2026-02-07 22:12:44 +00:00
command:
- "--providers.docker=true"
security_opt:
- no-new-privileges:true
2026-02-07 17:50:36 +00:00
ports:
- "80:80"
- "443:443"
environment:
- CF_DNS_API_TOKEN=${CF_DNS_API_TOKEN}
2026-02-07 17:50:36 +00:00
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.yaml:/etc/traefik/traefik.yaml:ro
- /srv/docker/traefik:/var/traefik/certs/:rw
- traefik-logs:/var/log/traefik
2026-02-07 17:50:36 +00:00
networks:
- traefik
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.entrypoints=web"
- "traefik.http.routers.traefik.rule=Host(`traefik-dashboard.home.gabesville.com`)"
- "traefik.http.middlewares.traefik-auth.basicauth.users=USER:BASIC_AUTH_PASSWORD"
- "traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https"
- "traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https"
- "traefik.http.routers.traefik.middlewares=traefik-https-redirect"
- "traefik.http.routers.traefik-secure.entrypoints=websecure"
- "traefik.http.routers.traefik-secure.rule=Host(`traefik-dashboard.home.gabesville.com`)"
- "traefik.http.routers.traefik-secure.middlewares=traefik-auth"
- "traefik.http.routers.traefik-secure.tls=true"
2026-02-07 17:50:36 +00:00
restart: unless-stopped
networks:
traefik:
name: traefik_network
driver: bridge
volumes:
traefik-logs: