feat(traefik): 添加traefik配置文件和docker-compose部署文件

添加traefik相关配置文件包括环境变量、主配置、动态配置和docker-compose部署文件
更新tasks.md中的docker compose命令语法
This commit is contained in:
cnphpbb
2025-08-28 17:34:26 +08:00
parent 9034fa472b
commit e51f84f6e1
5 changed files with 123 additions and 2 deletions

47
traefik/data/traefik.yml Normal file
View File

@@ -0,0 +1,47 @@
api:
dashboard: true
entryPoints:
web:
address: :80
http:
redirections:
entryPoint:
to: websecure
websecure:
address: :443
http:
middlewares:
- secureHeaders@file
- nofloc@file
tls:
certResolver: letsencrypt
pilot:
dashboard: false
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
file:
filename: /configurations/dynamic.yml
certificatesResolvers:
letsencrypt:
acme:
email: admin@yourdomain
storage: acme.json
keyType: EC384
httpChallenge:
entryPoint: web
buypass:
acme:
email: admin@yourdomain
storage: acme.json
caServer: https://api.buypass.com/acme/directory
keyType: EC256
httpChallenge:
entryPoint: web