fix: 使用宿主机 IP 进行健康检查
- 改用 172.17.16.14 替代 localhost - 确保健康检查在 host 网络模式下正常工作
This commit is contained in:
@@ -41,7 +41,7 @@ services:
|
||||
memory: ${GATEWAY_MEMORY_LIMIT}
|
||||
cpus: '1.0'
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:48080/actuator/health"]
|
||||
test: ["CMD", "sh", "-c", "wget --no-verbose --tries=1 --spider http://172.17.16.14:48080/ || exit 1"]
|
||||
interval: ${HEALTH_CHECK_INTERVAL}
|
||||
timeout: ${HEALTH_CHECK_TIMEOUT}
|
||||
retries: ${HEALTH_CHECK_RETRIES}
|
||||
|
||||
Reference in New Issue
Block a user