This commit is contained in:
hailin 2025-05-18 16:27:47 +08:00
parent 08b4f80e21
commit 8df9023463
1 changed files with 4 additions and 2 deletions

View File

@ -1,10 +1,12 @@
#!/bin/bash
set -euo pipefail
export SUPABASE_ANON_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0"
echo "[chatai-ui] Waiting for Kong to proxy PostgREST..."
until curl -sSf http://localhost:8000/rest/v1/health > /dev/null 2>&1; do
echo "[chatai-ui] Still waiting for API route /rest/v1/health..."
until curl -s -o /dev/null -w "%{http_code}" -H "apikey: $SUPABASE_ANON_KEY" http://localhost:8000/rest/v1/ | grep -qE "^(200|401|403)$"; do
echo "[chatai-ui] Still waiting for /rest/v1/ ..."
sleep 1
done