douyinWEB/scripts/DEPLOY_TEST1_SAFE.md
2026-08-15 04:50:28 -05:00

653 B
Raw Blame History

test1 分支部署数据安全红线

原则

服务器上的业务数据是唯一真实来源。test1 只允许更新代码,禁止用本机或 git 覆盖数据。

禁止覆盖

  • backend/data/monitor.db(及 -shm / -wal)
  • backend/data/covers/
  • backend/data/clips/
  • backend/data/tiktok_cookies/
  • pb_data/

正确部署

python scripts/_deploy_test1_safe.py

该脚本只会:备份 DB 到 /tmp → git pull test1 → 重启 API → 前端 build → 重启 Web。

Schema 变更

允许 ALTER TABLE ADD COLUMN 等向前兼容迁移;禁止 DROP 表/列、禁止用本机 DB 替换线上。