Skip to content

Commit

Permalink
4810 doc
Browse files Browse the repository at this point in the history
  • Loading branch information
c121914yu committed Aug 25, 2024
1 parent ace84f0 commit 53af925
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
24 changes: 22 additions & 2 deletions docSite/content/zh-cn/docs/development/upgrading/4810.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,36 @@ weight: 814

### 1. 做好数据备份

### 2. 更新商业版环境变量

### 2. 商业版 —— 修改环境变量

1. 需要给`fastgpt-pro`镜像,增加沙盒的环境变量:`SANDBOX_URL=http://xxxxx:3000`
2. 给两个镜像增加环境变量,以便更好的存储系统日志:
2. `fastgpt-pro`镜像和`fastgpt`镜像增加环境变量,以便更好的存储系统日志:

```
LOG_LEVEL=debug
STORE_LOG_LEVEL=warn
```

### 3. 修改镜像tag

- 更新 FastGPT 镜像 tag: v4.8.10-alpha
- 更新 FastGPT 商业版镜像 tag: v4.8.10-alpha
- Sandbox 镜像,可以不更新

## 4. 执行初始化

从任意终端,发起 1 个 HTTP 请求。其中 {{rootkey}} 替换成环境变量里的 `rootkey`;{{host}} 替换成**FastGPT 域名**

```bash
curl --location --request POST 'https://{{host}}/api/admin/initv4810' \
--header 'rootkey: {{rootkey}}' \
--header 'Content-Type: application/json'
```

1. 初始化发布记录版本标记
2. 初始化开票记录

-------

## V4.8.10 更新说明
Expand Down
6 changes: 6 additions & 0 deletions projects/app/src/pages/api/admin/initv4810.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { authCert } from '@fastgpt/service/support/permission/auth/common';
import { MongoDataset } from '@fastgpt/service/core/dataset/schema';
import { DatasetDefaultPermissionVal } from '@fastgpt/global/support/permission/dataset/constant';
import { MongoAppVersion } from '@fastgpt/service/core/app/version/schema';
import { FastGPTProUrl } from '@fastgpt/service/common/system/constants';
import { POST } from '@fastgpt/service/common/api/plusRequest';

/* pg 中的数据搬到 mongo dataset.datas 中,并做映射 */
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
Expand All @@ -21,6 +23,10 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
}
);

if (FastGPTProUrl) {
await POST('/admin/init/4810');
}

jsonRes(res, {
message: 'success'
});
Expand Down

0 comments on commit 53af925

Please sign in to comment.