Files
docker-compose-template/apps/traefik/compose.yaml
T
Viren070 ec66655997 feat!: a few (important) changes
- move core configuratiion (authelia, traefik) to main .env
- move all hostname definitions to main .env
- add cloudflare ddns to automatically create DNS records
- automatically determine stremio addon hostnames for authelia using predefined hostname environment variables
- give all services a profile, including the previously implicit "default" services. Instead provide an explicit "required" profile that contains traefik and authelia. Allowing you to restart a specific profile without including the previous default services and also allowing you to have more control.
2025-04-18 20:14:28 +01:00

67 lines
2.2 KiB
YAML

services:
traefik:
image: traefik:v3
container_name: traefik
restart: unless-stopped
environment:
- TZ=${TZ:-UTC}
ports:
- 443:443
- 80:80
command:
- '--api=true'
- '--api.dashboard=true'
- '--api.insecure=false'
- '--global.sendAnonymousUsage=false'
- '--global.checkNewVersion=false'
- '--log=true'
- '--log.level=DEBUG'
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entryPoints.web.address=:80"
- "--entryPoints.websecure.address=:443"
- "--entryPoints.web.forwardedHeaders.insecure=false"
- "--entryPoints.web.proxyProtocol.insecure=false"
- "--entryPoints.web.http.redirections.entryPoint.to=websecure"
- "--entryPoints.web.http.redirections.entryPoint.scheme=https"
- "--entryPoints.web.forwardedHeaders.trustedIPs=${TRUSTED_IPS}"
- "--entryPoints.web.proxyProtocol.trustedIPs=${TRUSTED_IPS}"
- "--entryPoints.websecure.forwardedHeaders.insecure=false"
- "--entryPoints.websecure.proxyProtocol.insecure=false"
- "--entryPoints.websecure.forwardedHeaders.trustedIPs=${TRUSTED_IPS}"
- "--entryPoints.websecure.proxyProtocol.trustedIPs=${TRUSTED_IPS}"
- "--certificatesresolvers.letsencrypt.acme.tlschallenge=true"
- "--certificatesresolvers.letsencrypt.acme.email=${LETSENCRYPT_EMAIL?}"
- "--certificatesresolvers.letsencrypt.acme.storage=/config/acme.json"
- "--log.level=INFO"
- "--ping"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "${DOCKER_DATA_DIR}/traefik:/config"
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.rule=Host(`${TRAEFIK_HOSTNAME?}`)"
- "traefik.http.routers.api.entrypoints=websecure"
- "traefik.http.routers.api.tls.certresolver=letsencrypt"
- "traefik.http.routers.api.service=api@internal"
- "traefik.http.routers.api.middlewares=authelia@docker"
healthcheck:
test: ["CMD", "traefik", "healthcheck", "--ping"]
interval: 10s
timeout: 5s
retries: 3
depends_on:
authelia:
condition: service_healthy
profiles:
- traefik
- required
- all