File size: 738 Bytes
daa0358 47fa380 daa0358 47fa380 daa0358 47fa380 daa0358 47fa380 daa0358 47fa380 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #!/bin/bash
set -e
python apps/regulatory_api.py &
REG_PID=$!
python apps/crm_api.py &
CRM_PID=$!
python apps/audit_api.py &
AUD_PID=$!
wait_for_service() {
local url=$1
local name=$2
for i in $(seq 1 30); do
if curl -sf "$url" > /dev/null 2>&1; then
echo "[start.sh] $name ready"
return 0
fi
sleep 1
done
echo "[start.sh] WARNING: $name did not become ready within 30s"
return 1
}
wait_for_service "http://localhost:8001/health" "regulatory_api"
wait_for_service "http://localhost:8002/health" "crm_api"
wait_for_service "http://localhost:8003/health" "audit_api"
echo "[start.sh] All microservices up. Launching environment server on :8000"
exec uvicorn server.app:app --host 0.0.0.0 --port 8000
|