diff --git a/scripts/ops/check_chat_health.sh b/scripts/ops/check_chat_health.sh index 9c97b7f..87991f5 100755 --- a/scripts/ops/check_chat_health.sh +++ b/scripts/ops/check_chat_health.sh @@ -5,6 +5,7 @@ BASE_URL="${1:-http://localhost:8081}" CHAT_HEALTH_URL="${BASE_URL%/}/chat-health" BACKEND_HEALTH_URL="${BASE_URL%/}/health" EMAIL_HEALTH_URL="${BASE_URL%/}/email-health" +CHECK_CHAT_HEALTH_SKIP_DOCKER_CHECKS="${CHECK_CHAT_HEALTH_SKIP_DOCKER_CHECKS:-0}" check_http_200() { url="$1" @@ -27,9 +28,11 @@ if ! check_http_200 "$EMAIL_HEALTH_URL"; then exit 5 fi -if docker compose ps --format json 2>/dev/null | grep -q '"Health":"unhealthy"'; then - echo "[ALERT] at least one container has unhealthy state" >&2 - exit 4 +if [ "$CHECK_CHAT_HEALTH_SKIP_DOCKER_CHECKS" != "1" ]; then + if docker compose ps --format json 2>/dev/null | grep -q '"Health":"unhealthy"'; then + echo "[ALERT] at least one container has unhealthy state" >&2 + exit 4 + fi fi echo "[OK] chat-service, backend and email-service are healthy" diff --git a/scripts/ops/prod_security_audit.sh b/scripts/ops/prod_security_audit.sh index 7b50d70..39fa467 100755 --- a/scripts/ops/prod_security_audit.sh +++ b/scripts/ops/prod_security_audit.sh @@ -164,7 +164,7 @@ run_local_smoke() { candidate="$(echo "$candidate" | xargs)" [[ -z "$candidate" ]] && continue - if ./scripts/ops/check_chat_health.sh "$candidate" >/dev/null 2>&1 && \ + if CHECK_CHAT_HEALTH_SKIP_DOCKER_CHECKS="$LOCAL_SMOKE_SKIP_DOCKER_CHECKS" ./scripts/ops/check_chat_health.sh "$candidate" >/dev/null 2>&1 && \ SECURITY_SMOKE_SKIP_DOCKER_CHECKS="$LOCAL_SMOKE_SKIP_DOCKER_CHECKS" ./scripts/ops/security_smoke.sh "$candidate" >/dev/null 2>&1; then log "Local smoke checks passed via ${candidate} (attempt ${attempt}/${max_attempts})" ok=1