traefik/docker-compose.yml

35 lines
1.1 KiB
YAML
Raw Normal View History

volumes:
traefik:
networks:
traefik:
name: traefik
services:
traefik:
image: "${IMAGE:-traefik}:${VERSION:-latest}"
container_name: "${NAME:-traefik}"
command:
- --providers.docker=true
- --providers.docker.exposedbydefault=${EXPOSED_BY_DEFAULT:-false}
- --api.dashboard=${DASHBOARD:-false}
- --api.debug=${DEBUG:-false}
- --log.level=${LOG_LEVEL:-ERROR}
- --entrypoints.web.address=:80
- --entrypoints.local.address=:8443
ports:
- "${WEB_PORT:-127.0.0.1:8000:80}"
- "${LOCAL_PORT:-127.0.0.1:8443:8443}"
labels:
- "traefik.http.routers.${ROUTER:-traefik}.rule=Host(`${DOMAIN:-traefik.local.krislamo.org}`)"
- "traefik.http.routers.${ROUTER:-traefik}.service=api@internal"
- "traefik.http.routers.${ROUTER:-traefik}.entrypoints=${ENTRYPOINT:-local}"
- "traefik.http.routers.${ROUTER:-traefik}.tls=${DASHBOARD_TLS:-true}"
- "traefik.docker.network=${NETWORK:-traefik}"
- "traefik.enable=${DASHBOARD:-false}"
networks:
- traefik
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- "traefik:/etc/traefik"