Initial commit: breakpilot-compliance - Compliance SDK Platform
Services: Admin-Compliance, Backend-Compliance, AI-Compliance-SDK, Consent-SDK, Developer-Portal, PCA-Platform, DSMS Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
23
scripts/wait-for-core.sh
Normal file
23
scripts/wait-for-core.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
# =========================================================
|
||||
# wait-for-core.sh — Wait for Core infrastructure
|
||||
# =========================================================
|
||||
# Used by lehrer/compliance docker-compose as init container
|
||||
|
||||
MAX_RETRIES=${MAX_RETRIES:-60}
|
||||
RETRY_INTERVAL=${RETRY_INTERVAL:-5}
|
||||
HEALTH_URL=${HEALTH_URL:-http://bp-core-health:8099/health}
|
||||
|
||||
echo "Waiting for Core infrastructure at $HEALTH_URL ..."
|
||||
|
||||
for i in $(seq 1 $MAX_RETRIES); do
|
||||
if curl -sf --max-time 3 "$HEALTH_URL" > /dev/null 2>&1; then
|
||||
echo "Core infrastructure is ready! (attempt $i)"
|
||||
exit 0
|
||||
fi
|
||||
echo " Attempt $i/$MAX_RETRIES — Core not ready yet, retrying in ${RETRY_INTERVAL}s..."
|
||||
sleep $RETRY_INTERVAL
|
||||
done
|
||||
|
||||
echo "ERROR: Core infrastructure did not become ready after $((MAX_RETRIES * RETRY_INTERVAL))s"
|
||||
exit 1
|
||||
Reference in New Issue
Block a user