changes to the startup

This commit is contained in:
2026-07-15 22:15:14 +02:00
parent b90ef44f27
commit 6fdc09585f
+4 -1
View File
@@ -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