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

20 lines
699 B
JSON

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