将Consul配置中的服务检查地址从容器名改为远程IP地址,以支持跨服务器健康检查 删除旧的部署脚本和配置文件,新增分离的远程和本地部署脚本 重构docker-compose配置为远程和本地两个版本,优化服务部署结构
21 lines
740 B
JSON
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
|
|
}
|
|
} |