AriStockAI/consul/config/emotion-service.hcl
fanfpy f19ce5992f feat: 重构服务注册与发现机制,使用Consul进行集中管理
- 移除各服务的独立注册脚本,改为通过Consul配置文件集中管理
- 为所有服务添加健康检查端点
- 更新docker-compose配置,添加网络和健康检查依赖
- 修改data-service的启动命令和端口配置
- 禁用Consul的ACL以简化开发环境配置
2025-06-22 22:35:51 +08:00

17 lines
339 B
HCL

service {
name = "emotion-service"
id = "emotion-service-1"
address = "emotion-service"
port = 8002
check {
http = "http://emotion-service:8002/health"
interval = "10s"
timeout = "5s"
}
meta = {
"traefik.enable" = "true"
"traefik.http.routers.emotion-service.rule" = "PathPrefix(`/api/emotion`)"
}
}