AriStockAI/consul/config/dev/quant-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
674 B
JSON

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