AriStockAI/consul/config/dev/data-service.json
fanfpy 92029b89e9 refactor(consul): 更新服务检查地址为远程IP并重构部署脚本
将Consul配置中的服务检查地址从容器名改为远程IP地址,以支持跨服务器健康检查
删除旧的部署脚本和配置文件,新增分离的远程和本地部署脚本
重构docker-compose配置为远程和本地两个版本,优化服务部署结构
2025-07-21 17:35:36 +08:00

21 lines
740 B
JSON

{
"service": {
"address": "data-service",
"check": {
"http": "http://10.195.102.127:8000/api/public/stock_bid_ask_em?symbol=000001",
"interval": "10s",
"timeout": "5s"
},
"id": "data-service",
"tags": [
"traefik.enable=true",
"traefik.http.routers.data-service.rule=PathPrefix(`/api/data`) || PathPrefix(`/api/public`)",
"traefik.http.routers.data-service.priority=100",
"traefik.http.routers.data-service.entrypoints=web",
"traefik.http.middlewares.data-service-stripprefix.stripprefix.prefixes=/api/data,/api/public",
"traefik.http.routers.data-service.middlewares=data-service-stripprefix@consulcatalog"
],
"name": "data-service",
"port": 8000
}
}