AriStockAI/consul/config/dev/user-service.json
fanfpy 5286cb0e80 refactor(docker): 更新Python基础镜像至3.11-slim-bullseye
refactor(consul): 统一服务配置使用服务名和标准端口

更新Dockerfile中的Python基础镜像版本以使用更稳定的3.11版本
修改consul配置文件中服务检查地址和端口,使用服务名替代IP地址并统一端口号
2025-07-22 18:04:11 +08:00

20 lines
655 B
JSON

{
"service": {
"address": "user-service",
"check": {
"http": "http://user-service:8004/health",
"interval": "10s",
"timeout": "5s"
},
"id": "user-service",
"tags": [
"traefik.enable=true",
"traefik.http.routers.user-service.rule=PathPrefix(`/api/user`) || PathPrefix(`/api/auth`)",
"traefik.http.routers.user-service.entrypoints=web",
"traefik.http.middlewares.user-service-stripprefix.stripprefix.prefixes=/api/user,/api/auth",
"traefik.http.routers.user-service.middlewares=user-service-stripprefix@consulcatalog"
],
"name": "user-service",
"port": 8004
}
}