docker-infra/1. docker-stacks/traefik/docker-compose.yml

32 lines
960 B
YAML
Raw Normal View History

2025-11-28 21:14:40 +00:00
services:
traefik:
image: traefik:v3.6.2
2025-11-28 21:14:40 +00:00
container_name: traefik
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
- proxy
ports:
- "80:80"
- "443:443"
environment:
- CF_DNS_API_TOKEN=${CF_DNS_API_TOKEN}
2025-11-28 21:14:40 +00:00
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./data/traefik.yml:/traefik.yml:ro
- ./data/acme.json:/acme.json
- ./data/rules:/rules
2025-11-28 21:14:40 +00:00
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.rule=Host(`traefik.stackbabber.nl`)"
- "traefik.http.routers.traefik.entrypoints=websecure"
- "traefik.http.routers.traefik.tls=true"
- "traefik.http.routers.traefik.tls.certresolver=letsencrypt"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.routers.traefik.middlewares=authentik@file"
2025-11-28 21:14:40 +00:00
networks:
proxy:
external: true