This commit is contained in:
hailin 2025-05-18 13:37:50 +08:00
parent 35850bad5f
commit 6e5aaf0011
1 changed files with 7 additions and 7 deletions

View File

@ -1,14 +1,14 @@
#!/bin/bash
set -e
set -euo pipefail
# --- 等待 Kong 代理接口可用(假设它暴露在 127.0.0.1:8000---
echo "[chatai-ui] Waiting for Kong to be ready at http://localhost:8000/..."
until curl -sSf http://localhost:8000/ > /dev/null; do
echo "[chatai-ui] Kong not ready yet, retrying..."
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..."
sleep 1
done
echo "[chatai-ui] Kong is ready."
# --- 切换到项目目录并启动 next.js ---
echo "[chatai-ui] API is reachable via Kong. Starting UI..."
cd /supabase/chatai-ui
exec npm run start