docker-deploy/traefik/docker-compose-file-provider.yml
2021-12-10 14:44:51 +08:00

36 lines
1.2 KiB
YAML

version: "3.9"
services:
traefik-reverse-proxy:
image: traefik:v2.5
ports:
- "80:80"
- "443:443"
environment:
- "TZ=Asia/Shanghai"
- LINODE_TOKEN=${LINODE_TOKEN}
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik-dashboard.rule=Host(`traefik.esin.io`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
- "traefik.http.routers.traefik-dashboard.tls=true"
- "traefik.http.routers.traefik-dashboard.service=api@internal"
- "traefik.http.routers.traefik-dashboard.middlewares=traefik-dashboard-auth"
- "traefik.http.middlewares.traefik-dashboard-auth.basicauth.users=${AUTH_USER}:${AUTH_PASS}"
- "traefik.http.middlewares.traefik-dashboard.compress=true"
- "traefik.http.middlewares.traefik-dashboard.compress.excludedcontenttypes=text/event-stream"
volumes:
- ./traefik/acme.json:/etc/acme/acme.json
- ./traefik/log:/var/log/traefik
- ./traefik/config/dynamic.d:/etc/traefik/dynamic.d:ro
- ./traefik/config/static.yml:/etc/traefik/traefik.yml:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- traefik
networks:
traefik:
external: true