This commit is contained in:
parent
ac506110d0
commit
35850bad5f
|
|
@ -9,7 +9,7 @@
|
|||
"clean": "npm run lint:fix && npm run format:write",
|
||||
"dev": "next dev -H 0.0.0.0",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"start": "next start -H 0.0.0.0",
|
||||
"start:prod": "npm run build && pm2 start npm --name \"chatai-ui\" -- run start",
|
||||
"lint": "next lint",
|
||||
"lint:fix": "next lint --fix",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,14 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# 直接启动已构建好的 Next.js app,监听 0.0.0.0
|
||||
exec node node_modules/next/dist/bin/next start -H 0.0.0.0
|
||||
# --- 等待 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..."
|
||||
sleep 1
|
||||
done
|
||||
echo "[chatai-ui] Kong is ready."
|
||||
|
||||
# --- 切换到项目目录并启动 next.js ---
|
||||
cd /supabase/chatai-ui
|
||||
exec npm run start
|
||||
|
|
|
|||
Loading…
Reference in New Issue