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

33 lines
No EOL
942 B
YAML

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}
# Dit lost de "client version too old" fout op:
- DOCKER_API_VERSION=1.45
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
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"
- "traefik.http.routers.traefik.middlewares=authentik@file"
networks:
proxy:
external: true