This commit is contained in:
parent
35850bad5f
commit
6e5aaf0011
|
|
@ -1,14 +1,14 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -euo pipefail
|
||||||
|
|
||||||
# --- 等待 Kong 代理接口可用(假设它暴露在 127.0.0.1:8000)---
|
echo "[chatai-ui] Waiting for Kong to proxy PostgREST..."
|
||||||
echo "[chatai-ui] Waiting for Kong to be ready at http://localhost:8000/..."
|
|
||||||
until curl -sSf http://localhost:8000/ > /dev/null; do
|
until curl -sSf http://localhost:8000/rest/v1/health > /dev/null 2>&1; do
|
||||||
echo "[chatai-ui] Kong not ready yet, retrying..."
|
echo "[chatai-ui] Still waiting for API route /rest/v1/health..."
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
echo "[chatai-ui] Kong is ready."
|
|
||||||
|
|
||||||
# --- 切换到项目目录并启动 next.js ---
|
echo "[chatai-ui] API is reachable via Kong. Starting UI..."
|
||||||
|
|
||||||
cd /supabase/chatai-ui
|
cd /supabase/chatai-ui
|
||||||
exec npm run start
|
exec npm run start
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue