From 8df9023463a145ec5dc8137b221f0316c296ca1a Mon Sep 17 00:00:00 2001 From: hailin Date: Sun, 18 May 2025 16:27:47 +0800 Subject: [PATCH] . --- supabase/chatai-ui/wrapper.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/supabase/chatai-ui/wrapper.sh b/supabase/chatai-ui/wrapper.sh index ff942b7..dff05c1 100644 --- a/supabase/chatai-ui/wrapper.sh +++ b/supabase/chatai-ui/wrapper.sh @@ -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