docker-deploy/traefik/docker-compose-file-provider.yml

36 lines
1.2 KiB
YAML
Raw Normal View History

2021-09-19 13:56:24 +08:00
version: "3.9"
services:
2021-12-10 14:44:51 +08:00
traefik-reverse-proxy:
2021-09-19 13:56:24 +08:00
image: traefik:v2.5
ports:
- "80:80"
- "443:443"
environment:
- "TZ=Asia/Shanghai"
2021-12-10 14:44:51 +08:00
- LINODE_TOKEN=${LINODE_TOKEN}
2021-09-19 13:56:24 +08:00
labels:
- "traefik.enable=true"
2021-12-10 14:44:51 +08:00
- "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"
2021-09-19 13:56:24 +08:00
volumes:
2021-12-10 14:44:51 +08:00
- ./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
2021-09-19 13:56:24 +08:00
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- traefik
networks:
traefik:
external: true