Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/deployment-runbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

本文档记录 MeteorVoice monorepo 迁移后的 Web 部署方式。当前 Web app 位于 `apps/web`,Mobile 位于 `apps/mobile`,共享包位于 `packages/*`。

腾讯云 Web/API Docker + 源码 Artifact 部署及 PM2 迁移步骤见 `docs/tencent-docker-deployment.md` `docs/tencent-docker-deployment.zh-CN.md`。该文档在迁移验收完成前属于目标设计,不代表服务器已经切换到 Docker
腾讯云 Web/API 已使用 Docker + 源码 Artifact 部署;架构、PM2 回滚保留策略和操作步骤见 `docs/tencent-docker-deployment.md` `docs/tencent-docker-deployment.zh-CN.md`。

## Vercel 推荐配置

Expand Down
15 changes: 7 additions & 8 deletions docs/tencent-docker-deployment.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Tencent Docker Deployment

This runbook defines the target Docker deployment for the MeteorVoice Web/API on the existing Tencent server. It covers the server component only; the iOS app, hosted Supabase project, and host Nginx remain outside Docker.
This runbook defines the active Docker deployment for the MeteorVoice Web/API on the existing Tencent server. It covers the server component only; the iOS app, hosted Supabase project, and host Nginx remain outside Docker.

> Status: target design. The active Tencent deployment still uses PM2 until the migration acceptance checklist in this document is complete.
> Status: active since v1.4.2. Preview and production run in Docker; the stopped PM2 definitions are retained only for emergency rollback.

## Environment mapping

Expand All @@ -13,7 +13,7 @@ This runbook defines the target Docker deployment for the MeteorVoice Web/API on

Nginx MUST continue binding public ports 80/443. Containers MUST publish only to `127.0.0.1`.

## Target delivery flow
## Active delivery flow

1. A GitHub-hosted runner checks out the requested commit.
2. CI runs lint, tests, mobile typecheck, and the Web production build.
Expand Down Expand Up @@ -59,12 +59,11 @@ Deployment metadata MAY live under `/srv/containers/meteorvoice/{preview,product
Migrate one environment at a time, preview before production.

1. Record the current Git commit, PM2 process, Nginx configuration, and public health result.
2. Build and push the candidate image without changing the server runtime.
2. Upload the validated source artifact and build the candidate image without changing the active runtime.
3. Start a shadow container on an unused localhost port and verify Web pages plus `/api/scenarios`, `/api/chat` request validation, and TTS request validation.
4. Switch only the relevant Nginx upstream to the shadow container and run public-domain checks.
5. Stop only the matching PM2 process.
6. Start the final Compose project on the existing `3101` or `3100` port and return Nginx to that port.
7. Observe logs and health before migrating the next environment.
4. Stop only the matching PM2 process after the shadow health check succeeds.
5. Start the final Compose project on the existing `3101` or `3100` port; Nginx continues targeting that unchanged port.
6. Observe logs and health before migrating the next environment.

Do not run `pm2 kill`. Keep the PM2 definitions and source checkout until both environments have passed the observation window.

Expand Down
15 changes: 7 additions & 8 deletions docs/tencent-docker-deployment.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 腾讯云 Docker 部署

本文定义 MeteorVoice Web/API 在现有腾讯云服务器上的目标 Docker 部署方式。容器化范围只包括服务端 Web/API;iOS App、托管 Supabase 和宿主机 Nginx 不进入 Docker。
本文定义 MeteorVoice Web/API 在现有腾讯云服务器上的现行 Docker 部署方式。容器化范围只包括服务端 Web/API;iOS App、托管 Supabase 和宿主机 Nginx 不进入 Docker。

> 状态:目标设计。完成本文验收清单之前,腾讯云当前仍使用 PM2 部署
> 状态:自 v1.4.2 起正式启用。预览与生产均由 Docker 运行;已停止的 PM2 定义仅用于紧急回滚

## 环境映射

Expand All @@ -13,7 +13,7 @@

Nginx MUST 继续监听公网 80/443 端口。容器 MUST 只发布到 `127.0.0.1`。

## 目标交付流程
## 现行交付流程

1. GitHub 托管 Runner 检出目标提交。
2. CI 执行 lint、测试、Mobile typecheck 和 Web 生产构建。
Expand Down Expand Up @@ -59,12 +59,11 @@ Nginx MUST 继续监听公网 80/443 端口。容器 MUST 只发布到 `127.0.0.
每次只迁移一个环境,必须先预览后生产。

1. 记录当前 Git commit、PM2 进程、Nginx 配置和公网健康结果。
2. 构建并推送候选镜像,不改变服务器运行状态
2. 上传已验证的源码 Artifact 并构建候选镜像,不改变当前运行状态
3. 在未使用的 localhost 端口启动影子容器,验证 Web 页面以及 `/api/scenarios`、`/api/chat` 参数校验和 TTS 参数校验。
4. 只将当前环境的 Nginx upstream 切到影子容器并执行公网检查。
5. 只停止对应 PM2 进程。
6. 在原 `3101` 或 `3100` 端口启动最终 Compose 项目,并将 Nginx 恢复指向该端口。
7. 观察日志和健康状态后,再迁移下一个环境。
4. 影子健康检查通过后,只停止对应 PM2 进程。
5. 在原 `3101` 或 `3100` 端口启动最终 Compose 项目;Nginx 始终指向这个未变化的端口。
6. 观察日志和健康状态后,再迁移下一个环境。

禁止执行 `pm2 kill`。两个环境完成观察期之前,保留 PM2 定义和服务器源码目录。

Expand Down
Loading