Implement three divination modes, learn pages, and PM2 deploy on port 3130.
Add liuyao/bazi/combined flows with shared calc and AI infrastructure, 64-gua learn routes, and update Ubuntu PM2 deployment docs for port 3130. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+11
-4
@@ -1,11 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
# 知命阁(zhimingge)服务器更新脚本
|
||||
# 知命阁(zhimingge)Ubuntu 服务器更新脚本
|
||||
# 用法:cd /opt/zhimingge && bash scripts/deploy.sh
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
APP_DIR="/opt/zhimingge"
|
||||
APP_NAME="zhimingge"
|
||||
APP_PORT="${PORT:-3130}"
|
||||
|
||||
cd "$APP_DIR"
|
||||
|
||||
@@ -22,8 +23,14 @@ echo "==> 确保日志目录存在..."
|
||||
mkdir -p logs
|
||||
|
||||
echo "==> 重启 PM2..."
|
||||
pm2 restart "$APP_NAME" || pm2 start ecosystem.config.cjs
|
||||
if pm2 describe "$APP_NAME" > /dev/null 2>&1; then
|
||||
pm2 restart "$APP_NAME"
|
||||
else
|
||||
pm2 start ecosystem.config.cjs
|
||||
fi
|
||||
|
||||
echo "==> 部署完成"
|
||||
pm2 save
|
||||
|
||||
echo "==> 部署完成,验证 http://127.0.0.1:${APP_PORT} ..."
|
||||
pm2 status "$APP_NAME"
|
||||
curl -s -o /dev/null -w "HTTP %{http_code}\n" http://127.0.0.1:3000 || true
|
||||
curl -s -o /dev/null -w "HTTP %{http_code}\n" "http://127.0.0.1:${APP_PORT}" || true
|
||||
|
||||
Reference in New Issue
Block a user