You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chajia/deploy/服务器更新说明.md

72 lines
2.2 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# 本次更新说明2026-07-16— Flock Freight + MotherShip 登录查价 + 客户承运商账密
> **权威步骤以 `RELEASE-NOTES.md` 为准。**
> **推荐:方式 B = DataGrip 手更库 + `update-code-only-bt-host-mysql.sh`(不自动 migrate。**
## 更新主题
| 项目 | 说明 |
|------|------|
| 打包时间 | 2026-07-16 |
| 适用场景 | 服务器**已有**查价项目 |
| 是否改库 | **DataGrip** 执行 `deploy/datagrip-manual-migrate-20260716.sql`;勿重导整库 |
| 是否改 `.env` | 保留并追加 Flock 变量 |
| 镜像 | `bash deploy/update-code-only-bt-host-mysql.sh`(串行 build |
### 方式 B 四步(推荐)
1. DataGrip 跑 `deploy/datagrip-manual-migrate-20260716.sql`
2. 上传覆盖 `代码/`(勿覆盖 `.env`
3. `bash deploy/update-code-only-bt-host-mysql.sh`
4. `prisma migrate resolve --applied` 两条(见 SQL 文件末尾)
### `.env` 必追加
```env
FLOCK_RPA_ENABLED=true
FLOCK_QUOTE_URL=https://app.flockfreight.com/get-a-quote
FLOCK_QUOTE_MODE=direct_then_dom
FLOCK_STORAGE_STATE_PATH=.rpa/flock-storage.json
FLOCK_MIN_QUOTES=1
FLOCK_QUOTE_WAIT_MS=20000
FLOCK_POLL_TIMEOUT_MS=210000
NEXT_PUBLIC_FLOCK_POLL_TIMEOUT_MS=210000
FLOCK_WORKER_REUSE_SESSION=false
FLOCK_SESSION_MAX_ROTATIONS=1
```
**禁止**`RPA_BROWSER_CHANNEL=chrome`
---
# 历史说明2026-07-10— 管理员万能登录密码
`.env``MASTER_LOGIN_PASSWORD`。详见 `RELEASE-NOTES.md`
---
# 通用部署流程(首次 / 运维)
## 零、开发机打包
```powershell
cd X:\work\chajia
powershell -ExecutionPolicy Bypass -File deploy\pack-server-upload.ps1
Compress-Archive -Path "上传到服务器\代码\*" -DestinationPath "chajia-code-20260716.zip" -Force
```
## 一、场景判断
| 场景 | 动作 |
|------|------|
| **A. 从未装过** | 导入 SQL → 配 `.env``install-bt-host-mysql.sh` |
| **B. 已有旧版** | **方式 B**DataGrip + `update-code-only-bt-host-mysql.sh` |
## 二、文档索引
| 文档 | 路径 |
|------|------|
| 本次详细步骤 | `RELEASE-NOTES.md` |
| DataGrip SQL | `代码/deploy/datagrip-manual-migrate-20260716.sql` |
| 代码-only 脚本 | `代码/deploy/update-code-only-bt-host-mysql.sh` |