chore(remote43): standardize stable crm repo root
This commit is contained in:
@@ -45,7 +45,7 @@ SUB2API_CRM_ADMIN_TOKEN=change-me-before-production SUB2API_CRM_LISTEN_ADDR=127.
|
||||
| `SUB2API_CRM_ADMIN_TOKEN` | 控制面 Bearer token | `crm-admin-token` |
|
||||
| `SUB2API_CRM_LISTEN_ADDR` | 监听地址 | `:18081` |
|
||||
| `SUB2API_CRM_SQLITE_DSN` | SQLite DSN | `file:/tmp/sub2api-cn-relay-manager.db?_foreign_keys=on&_busy_timeout=5000` |
|
||||
| `SUB2API_CRM_REPO_ROOT` | provider 草稿发布到 pack/provider 文件时使用的仓库根目录 | `/home/ubuntu/sub2api-cn-relay-manager-git-20260528-bundle` |
|
||||
| `SUB2API_CRM_REPO_ROOT` | provider 草稿发布到 pack/provider 文件时使用的仓库根目录 | `/home/ubuntu/sub2api-cn-relay-manager-git-current` |
|
||||
|
||||
## 公网 Portal 资产
|
||||
|
||||
@@ -93,6 +93,8 @@ SUB2API_CRM_ADMIN_TOKEN=change-me-before-production SUB2API_CRM_LISTEN_ADDR=127.
|
||||
|
||||
- CRM 进程必须配置 `SUB2API_CRM_REPO_ROOT`
|
||||
- 该目录必须是真实 Git 仓库,而不是普通文件夹
|
||||
- remote43 当前推荐固定路径:`/home/ubuntu/sub2api-cn-relay-manager-git-current`
|
||||
- 推荐由 `scripts/deploy/setup_remote43_patched_stack.sh` 统一准备,不要再手工生成带日期后缀的临时 repo 根目录
|
||||
- 当前实现会原子完成:
|
||||
- 生成或更新 `packs/<pack_id>/providers/<provider_id>.json`
|
||||
- bump `pack.json` patch 版本
|
||||
|
||||
@@ -49,7 +49,11 @@
|
||||
- 发布动作会把草稿 canonicalize 成完整 `pack.ProviderManifest`
|
||||
- 服务端会原子执行:写 `providers/<provider_id>.json`、bump `pack.json` patch 版本、更新 `checksums.txt`、重跑整包校验、`git add` + `git commit`
|
||||
- 运行前提新增:`SUB2API_CRM_REPO_ROOT` 必须指向**真实 Git 仓库**
|
||||
- remote43 原本的 `/home/ubuntu/sub2api-cn-relay-manager` 只是普通目录,不带 `.git`;当前已改为指向基于本机 `git bundle` 拉起的真实 checkout:`/home/ubuntu/sub2api-cn-relay-manager-git-20260528-bundle`
|
||||
- remote43 原本的 `/home/ubuntu/sub2api-cn-relay-manager` 只是普通目录,不带 `.git`
|
||||
- 2026-05-28 已继续把这条路径收成正式部署约定:
|
||||
- CRM 现在应统一指向 `/home/ubuntu/sub2api-cn-relay-manager-git-current`
|
||||
- `scripts/deploy/setup_remote43_patched_stack.sh` 会自动生成并刷新该固定 checkout
|
||||
- 这样 provider 草稿发布链不再依赖任何一次性的时间戳 repo 目录
|
||||
- 公网 `providers.html` 已新增“发布到仓库”按钮与 commit message 输入框
|
||||
- remote43 公网真验已通过:
|
||||
- `draft_id=draft_remote43_publish_smoke_1779924243`
|
||||
|
||||
@@ -97,6 +97,9 @@
|
||||
- `scripts/deploy/`
|
||||
- 部署与环境拉起脚本
|
||||
- 例如 `build_local_image.sh`、`setup_remote43_patched_stack.sh`、`deploy_tksea_portal.sh`
|
||||
- 其中 `setup_remote43_patched_stack.sh` 现会同步生成 remote43 固定仓库工作副本:
|
||||
- `/home/ubuntu/sub2api-cn-relay-manager-git-current`
|
||||
- 供 `SUB2API_CRM_REPO_ROOT` 与 provider 草稿发布链复用
|
||||
- `scripts/acceptance/`
|
||||
- 真实宿主验收与证据处理脚本
|
||||
- 例如 `real_host_acceptance.sh`、`import_remote43_provider.sh`、`check_deepseek_completion_split.sh`
|
||||
|
||||
@@ -84,6 +84,8 @@ bash ./scripts/deploy/setup_remote43_patched_stack.sh
|
||||
|
||||
脚本会:
|
||||
- 把本地 pack 镜像到 `/tmp/openai-cn-pack-<stack>` 并同步到 remote43 同路径
|
||||
- 把当前本地 `main` 分支打成 `git bundle`,并在 remote43 固定维护仓库工作副本:
|
||||
- `/home/ubuntu/sub2api-cn-relay-manager-git-current`
|
||||
- 上传 patched 宿主二进制与当前 CRM server 二进制
|
||||
- 在 remote43 拉起新的 Postgres / Redis / patched host
|
||||
- 在 remote43 启动独立 SQLite 的临时 CRM
|
||||
@@ -91,6 +93,9 @@ bash ./scripts/deploy/setup_remote43_patched_stack.sh
|
||||
- `local operator env file`
|
||||
- `local tunnel script`
|
||||
|
||||
说明:
|
||||
- 以后 provider 草稿发布链默认依赖这个固定 repo 根,不再依赖人工创建的时间戳 checkout 目录。
|
||||
|
||||
后续按脚本输出执行:
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user