添加 docker-compose/traefik/traefik.yaml

This commit is contained in:
2026-03-23 10:14:14 +08:00
parent 3053aa3fff
commit 9000a03703

View File

@@ -0,0 +1,25 @@
services:
traefik:
image: traefik:v3.6.8
container_name: traefik
restart: unless-stopped
security_opt:
- no-new-privileges:true
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
command:
- "--entrypoints.web.address=:80"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--api.dashboard=true"
- "--api.insecure=false"
- "--log.level=DEBUG"
- "--accesslog=true"
- "--metrics.prometheus=true"
labels:
- "traefik.enable=true"
- "traefik.http.routers.dashboard.rule=Host(`test.notesync.cn`)"
- "traefik.http.routers.dashboard.entrypoints=web"
- "traefik.http.routers.dashboard.service=api@internal"