ci(traefik): 添加docker provider配置并挂载docker.sock

在traefik配置中添加docker provider并设置exposedByDefault为false,同时在docker-compose中挂载docker.sock以支持容器发现
This commit is contained in:
fanfpy 2025-06-30 17:34:02 +08:00
parent e8fac3b536
commit caef728619
2 changed files with 5 additions and 0 deletions

View File

@ -31,6 +31,7 @@ services:
- "80:80"
- "8080:8080" # Traefik dashboard
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik/traefik.yml:/etc/traefik/traefik.yml
data-service:

View File

@ -2,7 +2,11 @@ entryPoints:
web:
address: ":80"
providers:
docker:
exposedByDefault: false
consulCatalog:
endpoint:
address: "consul:8500"