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

32 lines
876 B
YAML
Raw Normal View History

2025-11-28 21:14:40 +00:00
services:
traefik:
image: traefik:v3.0
container_name: traefik
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
- proxy
ports:
- "80:80"
- "443:443"
- "8080:8080"
environment:
- CF_DNS_API_TOKEN=${CF_DNS_API_TOKEN}
2025-11-28 23:28:54 +00:00
# Dit lost de "client version too old" fout op:
2025-11-28 23:25:56 +00:00
- DOCKER_API_VERSION=1.45
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=web"
- "traefik.http.routers.traefik.service=api@internal"
2025-11-28 21:14:40 +00:00
networks:
proxy:
external: true