优化稳定性部署

This commit is contained in:
rjb
2025-09-14 09:50:52 +08:00
parent 1efcef6e10
commit 1c07b9246f
11 changed files with 4503 additions and 0 deletions

29
start.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
# PromptForge 启动脚本
cd /home/renjianbo/aiapply
# 检查端口是否被占用
if netstat -tlnp | grep -q :3000; then
echo "端口 3000 已被占用,正在停止现有服务..."
pkill -f "next dev"
sleep 3
fi
# 启动服务
echo "启动 PromptForge 服务..."
nohup npx next@14.0.4 dev -H 0.0.0.0 -p 3000 > app.log 2>&1 &
# 等待服务启动
sleep 5
# 检查服务状态
if netstat -tlnp | grep -q :3000; then
echo "✅ PromptForge 服务启动成功!"
echo "🌐 访问地址: http://101.43.95.130:3000"
echo "📊 服务状态:"
netstat -tlnp | grep :3000
else
echo "❌ 服务启动失败,请检查日志:"
tail -20 app.log
fi