This commit is contained in:
freedakgmail
2025-11-23 19:38:51 +08:00
parent e44dd0bd95
commit 3b0d8255f6
649 changed files with 656698 additions and 4133 deletions
+31
View File
@@ -0,0 +1,31 @@
#!/bin/bash
# 在服务器上手动执行的命令
# 1. 配置pnpm使用国内镜像
pnpm config set registry https://registry.npmmirror.com
# 2. 进入部署目录
cd /var/www/chinese-family-tree
# 3. 清理之前失败的安装
rm -rf node_modules
rm -rf .next
# 4. 安装生产依赖
pnpm install --prod
# 5. 生成Prisma客户端
npx prisma generate
# 6. 运行数据库迁移
npx prisma migrate deploy
# 7. 启动应用
pm2 delete chinese-family-tree 2>/dev/null || true
PORT=8006 pm2 start npm --name "chinese-family-tree" -- start
pm2 save
pm2 startup systemd -u root --hp /root
# 8. 查看状态
pm2 status
pm2 logs chinese-family-tree --lines 20