【重要】traefik 配置

This commit is contained in:
编码猿
2025-09-30 10:01:58 +08:00
parent a3ba6c2944
commit 3c66faf9a7
3 changed files with 120 additions and 75 deletions

View File

@@ -10,7 +10,25 @@ entryPoints:
# 服务发现与配置源(关键:子项缩进必须一致)
providers:
docker: { }
# 动态路由规则文件
file:
filename: "/etc/traefik/dynamic.yml"
watch: true # 自动监听文件变化
log:
filePath: "/etc/traefik/log-file.log"
format: common
level: INFO
accessLog:
filePath: "/etc/traefik/access.log"
format: "json"
addInternals: true
filters:
retryAttempts: true
minDuration: "2ms"
fields:
defaultMode: "keep"
headers:
defaultMode: "keep"