From 6fdc09585fbc2de068a9bd582bb9ad7afff6bcf6 Mon Sep 17 00:00:00 2001 From: AIIrondev Date: Wed, 15 Jul 2026 22:15:14 +0200 Subject: [PATCH] changes to the startup --- Website/launch.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Website/launch.sh b/Website/launch.sh index 3b5480b..08814dd 100755 --- a/Website/launch.sh +++ b/Website/launch.sh @@ -96,7 +96,10 @@ wait_for_mongo_ready() { while [ $elapsed -lt $timeout_seconds ]; do container_state="$(${DOCKER_CMD[@]} inspect -f '{{.State.Status}} {{if .State.Health}}{{.State.Health.Status}}{{end}}' "$mongo_container_id" 2>/dev/null || true)" health_status="${container_state#* }" - if [ "${container_state%% *}" = "running" ]; then + if [ "$health_status" = "healthy" ]; then + return 0 + fi + if [ "${container_state%% *}" = "running" ] && [ -z "$health_status" ]; then return 0 fi if [ "${container_state%% *}" = "exited" ] || [ "${container_state%% *}" = "dead" ]; then