From 93e8848845d4ca151393320ca22f155c2ce84bab Mon Sep 17 00:00:00 2001 From: lzh Date: Tue, 13 Jan 2026 18:15:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BD=BF=E7=94=A8=E5=AE=BF=E4=B8=BB?= =?UTF-8?q?=E6=9C=BA=20IP=20=E8=BF=9B=E8=A1=8C=E5=81=A5=E5=BA=B7=E6=A3=80?= =?UTF-8?q?=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 改用 172.17.16.14 替代 localhost 确保健康检查在 host 网络模式下正常工作 --- docker-compose.core.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docker-compose.core.yml b/docker-compose.core.yml index d8b9145..7958e14 100644 --- a/docker-compose.core.yml +++ b/docker-compose.core.yml @@ -41,7 +41,7 @@ services: memory: ${GATEWAY_MEMORY_LIMIT} cpus: '1.0' healthcheck: - test: ["CMD", "sh", "-c", "wget --no-verbose --tries=1 --spider http://172.17.16.14:48080/ || exit 1"] + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://172.17.16.14:48080/actuator/health"] interval: ${HEALTH_CHECK_INTERVAL} timeout: ${HEALTH_CHECK_TIMEOUT} retries: ${HEALTH_CHECK_RETRIES} @@ -74,7 +74,7 @@ services: memory: ${SYSTEM_MEMORY_LIMIT} cpus: '1.0' healthcheck: - test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:48081/actuator/health"] + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://172.17.16.14:48081/actuator/health"] interval: ${HEALTH_CHECK_INTERVAL} timeout: ${HEALTH_CHECK_TIMEOUT} retries: ${HEALTH_CHECK_RETRIES} @@ -107,7 +107,7 @@ services: memory: ${INFRA_MEMORY_LIMIT} cpus: '1.0' healthcheck: - test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:48082/actuator/health"] + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://172.17.16.14:48082/actuator/health"] interval: ${HEALTH_CHECK_INTERVAL} timeout: ${HEALTH_CHECK_TIMEOUT} retries: ${HEALTH_CHECK_RETRIES} @@ -141,7 +141,7 @@ services: memory: ${IOT_SERVER_MEMORY_LIMIT} cpus: '1.5' healthcheck: - test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:48083/actuator/health"] + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://172.17.16.14:48083/actuator/health"] interval: ${HEALTH_CHECK_INTERVAL} timeout: ${HEALTH_CHECK_TIMEOUT} retries: ${HEALTH_CHECK_RETRIES} @@ -219,7 +219,7 @@ services: memory: ${IOT_GATEWAY_MEMORY_LIMIT} cpus: '1.5' healthcheck: - test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:48084/actuator/health"] + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://172.17.16.14:48084/actuator/health"] interval: ${HEALTH_CHECK_INTERVAL} timeout: ${HEALTH_CHECK_TIMEOUT} retries: ${HEALTH_CHECK_RETRIES} @@ -251,7 +251,7 @@ services: memory: ${OPS_MEMORY_LIMIT} cpus: '0.5' healthcheck: - test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:48085/actuator/health"] + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://172.17.16.14:48085/actuator/health"] interval: ${HEALTH_CHECK_INTERVAL} timeout: ${HEALTH_CHECK_TIMEOUT} retries: ${HEALTH_CHECK_RETRIES}