From 5d617a09980ec24c5c2305d94a992ce395edfdb8 Mon Sep 17 00:00:00 2001 From: majinghe <42570491+majinghe@users.noreply.github.com> Date: Thu, 15 Jan 2026 11:29:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20change=20health=20check=20statement=20to?= =?UTF-8?q?=20fix=20unhealthy=20issue=20for=20docker=20=E2=80=A6=20(#1515)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose-simple.yml | 2 +- docker-compose.yml | 4 ++-- docs/ansible/docker-compose-mnmd.yml | 2 +- docs/examples/docker/docker-comprehensive.yml | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docker-compose-simple.yml b/docker-compose-simple.yml index 9b409f43..ed60d261 100644 --- a/docker-compose-simple.yml +++ b/docker-compose-simple.yml @@ -40,7 +40,7 @@ services: [ "CMD", "sh", "-c", - "curl -f http://localhost:9000/health && curl -f http://localhost:9001/rustfs/console/health" + "curl -f http://127.0.0.1:9000/health && curl -f http://127.0.0.1:9001/rustfs/console/health" ] interval: 30s timeout: 10s diff --git a/docker-compose.yml b/docker-compose.yml index 2dd53a8c..2fcebd53 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -52,7 +52,7 @@ services: [ "CMD", "sh", "-c", - "curl -f http://localhost:9000/health && curl -f http://localhost:9001/rustfs/console/health" + "curl -f http://127.0.0.1:9000/health && curl -f http://127.0.0.1:9001/rustfs/console/health" ] interval: 30s timeout: 10s @@ -99,7 +99,7 @@ services: [ "CMD", "sh", "-c", - "curl -f http://localhost:9000/health && curl -f http://localhost:9001/rustfs/console/health" + "curl -f http://127.0.0.1:9000/health && curl -f http://127.0.0.1:9001/rustfs/console/health" ] interval: 30s timeout: 10s diff --git a/docs/ansible/docker-compose-mnmd.yml b/docs/ansible/docker-compose-mnmd.yml index 89b4cb56..fbc3159f 100644 --- a/docs/ansible/docker-compose-mnmd.yml +++ b/docs/ansible/docker-compose-mnmd.yml @@ -63,7 +63,7 @@ test: [ "CMD-SHELL", - "curl -f http://localhost:9000/health && curl -f http://localhost:9001/health || exit 1" + "curl -f http://127.0.0.1:9000/health && curl -f http://127.0.0.1:9001/health || exit 1" ] interval: 10s timeout: 5s diff --git a/docs/examples/docker/docker-comprehensive.yml b/docs/examples/docker/docker-comprehensive.yml index a87a0d94..7a3ddd43 100644 --- a/docs/examples/docker/docker-comprehensive.yml +++ b/docs/examples/docker/docker-comprehensive.yml @@ -15,7 +15,7 @@ services: - RUSTFS_ADDRESS=0.0.0.0:9000 - RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001 - RUSTFS_EXTERNAL_ADDRESS=:9000 - - RUSTFS_CORS_ALLOWED_ORIGINS=http://localhost:9001 + - RUSTFS_CORS_ALLOWED_ORIGINS=http://127.0.0.1:9001 - RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS=* - RUSTFS_ACCESS_KEY=admin - RUSTFS_SECRET_KEY=password @@ -25,7 +25,7 @@ services: - rustfs-network restart: unless-stopped healthcheck: - test: [ "CMD", "sh", "-c", "curl -f http://localhost:9000/health && curl -f http://localhost:9001/rustfs/console/health" ] + test: [ "CMD", "sh", "-c", "curl -f http://127.0.0.1:9000/health && curl -f http://127.0.0.1:9001/rustfs/console/health" ] interval: 30s timeout: 10s retries: 3 @@ -56,7 +56,7 @@ services: - rustfs-network restart: unless-stopped healthcheck: - test: [ "CMD", "sh", "-c", "curl -f http://localhost:9000/health && curl -f http://localhost:9001/rustfs/console/health" ] + test: [ "CMD", "sh", "-c", "curl -f http://127.0.0.1:9000/health && curl -f http://127.0.0.1:9001/rustfs/console/health" ] interval: 30s timeout: 10s retries: 3 @@ -92,7 +92,7 @@ services: - rustfs_secret_key restart: unless-stopped healthcheck: - test: [ "CMD", "sh", "-c", "curl -f http://localhost:9000/health && curl -f http://localhost:9001/rustfs/console/health" ] + test: [ "CMD", "sh", "-c", "curl -f http://127.0.0.1:9000/health && curl -f http://127.0.0.1:9001/rustfs/console/health" ] interval: 30s timeout: 10s retries: 3 @@ -127,7 +127,7 @@ services: - rustfs_enterprise_secret_key restart: unless-stopped healthcheck: - test: [ "CMD", "sh", "-c", "curl -f http://localhost:9000/health && curl -k -f https://localhost:9001/rustfs/console/health" ] + test: [ "CMD", "sh", "-c", "curl -f http://127.0.0.1:9000/health && curl -k -f https://127.0.0.1:9001/rustfs/console/health" ] interval: 30s timeout: 10s retries: 3 @@ -152,7 +152,7 @@ services: - rustfs-network restart: unless-stopped healthcheck: - test: [ "CMD", "curl", "-f", "http://localhost:9000/health" ] + test: [ "CMD", "curl", "-f", "http://127.0.0.1:9000/health" ] interval: 30s timeout: 10s retries: 3