Files
qipai/deploy/README.md
T
2026-06-15 16:34:36 +08:00

47 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 部署说明
本项目生产环境固定为 Ubuntu Server 24.04 x86-64/amd64,无桌面环境,禁止 Docker。生产入口固定为 `/opt/apps/setup.sh`,本仓库根目录 `setup.sh` 是同源菜单脚本。
## 环境边界
- Windows`D:\qipai`,唯一正式开发、测试、提交和推送工作区。
- WSL`/mnt/d/qipai`,仅做轻量检查;完整 Linux 构建必须复制到 WSL 原生临时目录。
- Ubuntu`/opt/apps`,由管理员通过菜单执行安装、更新、备份、恢复、回滚和诊断。
## 固定地址
- Gitea SSH`ssh://git@git.txyundm.cn:2222/panda/qipai.git`
- 生产只读 SSH`ssh://git@127.0.0.1:2222/panda/qipai.git`
- API`https://api.txyundm.cn`
- App API`https://api.txyundm.cn/app-api`
- Admin API`https://api.txyundm.cn/admin-api`
## 菜单
1. 首次安装
2. 更新业务服务
3. 安装或检查 EMQX
4. 配置域名与 HTTPS
5. 查看状态
6. 备份
7. 恢复
8. 回滚
9. 诊断
0. 退出
当前版本提供 M00-D/M00-E 部署基线:
- 启动快检:架构、基础命令、Docker 禁用提醒、Redis 预留状态。
- 首次安装:创建 `/opt/apps` 目录布局,写入 `run/layout.json`
- 更新业务服务:克隆/检查固定仓库,生成 release manifest。正式后端/后台未生成前仅执行安全 dry-run。
- EMQX:输出原生 Apt/无 Docker/MQTTX 禁止策略和本机命令状态。
- HTTPS:输出固定域名、API 路径和 Nginx 配置检查。
- Nginx:提供 `deploy/nginx/api.txyundm.cn.conf.template`,菜单第 4 项会检查模板、站点文件、TLS 和健康端点。
- 非交互检查:`setup.sh --preflight``setup.sh --status``setup.sh --https``setup.sh --diagnose`
- 状态:显示部署上下文、快检、仓库状态和当前 release manifest。
- 备份:当前生成 manifest-only 备份记录,不触碰真实数据库。
- 恢复/回滚:列出人工输入和回滚点,不自动改动生产数据。
- 诊断:汇总环境、仓库、磁盘和服务状态。
生产执行仍必须由管理员在 Ubuntu 上运行 `/opt/apps/setup.sh` 或同源脚本;Codex 不从 Windows/WSL 自动触发生产部署。