001project_wildgrowth/backend/deploy
wendazhi 3c3179ef7d init1 2026-02-11 15:26:03 +08:00
..
scripts init1 2026-02-11 15:26:03 +08:00
README.md init1 2026-02-11 15:26:03 +08:00
check-database.sh init1 2026-02-11 15:26:03 +08:00
check-notes-table.js init1 2026-02-11 15:26:03 +08:00
create-notes-table.js init1 2026-02-11 15:26:03 +08:00
deploy-course-generation-refactor.sh init1 2026-02-11 15:26:03 +08:00
deploy-from-github.sh init1 2026-02-11 15:26:03 +08:00
deploy-rsync-from-local.sh init1 2026-02-11 15:26:03 +08:00
fix-notes-constraints.js init1 2026-02-11 15:26:03 +08:00
setup-apple-secret.sh init1 2026-02-11 15:26:03 +08:00
setup-ssl-api.sh init1 2026-02-11 15:26:03 +08:00
update-nginx-ssl.sh init1 2026-02-11 15:26:03 +08:00

README.md

部署脚本说明

部署入口与完整流程见项目根 DEPLOY_QUICK.md 本文只说明本目录脚本。


脚本一览

脚本 用途
deploy-from-github.sh 日常部署与回滚(唯一正式入口)
scripts/server-cleanup-safe.sh 服务器安全清理冗余、logs、pm2、npm 缓存)
scripts/migration-fix-and-start.sh 仅当 prisma migrate deploy 报 P3015 且服务未起时,一次性修复并启动
check-database.sh 数据库连通检查
setup-ssl-api.sh / update-nginx-ssl.sh SSL / Nginx 一次性配置
setup-apple-secret.sh Apple IAP 等密钥配置

日常部署(摘要)

cd /var/www/wildgrowth-backend/backend
bash deploy/deploy-from-github.sh          # 部署
bash deploy/deploy-from-github.sh rollback # 回滚

⚠️ 复盘与教训

文档 说明
POSTMORTEM_ENV_OVERWRITE.md .env 被覆盖导致服务中断的复盘(必读

更多

  • 目录约定、首次搭建、手动部署、常见场景:见项目根 DEPLOY_QUICK.md
  • 清理项说明:见 SERVER_CLEANUP.md