Skip to content

Commit 9c8b935

Browse files
xqvvuc121914yu
andauthored
docs: update 4.15.0 upgrade migrations (#7163)
* docs: update 4.15.0 upgrade guide * docs: remove config json guide * docs: add standalone sandbox deployment files * doc * yml * doc * action * fix: test * doc * yml --------- Co-authored-by: archer <545436317@qq.com>
1 parent 759fb3e commit 9c8b935

93 files changed

Lines changed: 8510 additions & 959 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-code-sandbox.yml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Build fastgpt-code-sandbox images
22
on:
33
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: 'Image version tag (e.g. v4.15.0)'
7+
required: true
8+
type: string
49
push:
510
paths:
611
- 'projects/code-sandbox/**'
@@ -15,14 +20,27 @@ jobs:
1520
- name: Validate release version
1621
id: version
1722
env:
18-
VERSION: ${{ github.ref_name }}
23+
VERSION_INPUT: ${{ github.event.inputs.version }}
1924
REF_TYPE: ${{ github.ref_type }}
25+
REF_NAME: ${{ github.ref_name }}
26+
EVENT_NAME: ${{ github.event_name }}
2027
CURRENT_REF: ${{ github.ref }}
2128
run: |
22-
if [[ "$REF_TYPE" != "tag" || ! "$VERSION" =~ ^v ]]; then
23-
echo "::error::Release workflow must run on a tag starting with v. Current ref: ${CURRENT_REF}"
29+
if [[ "$EVENT_NAME" == "workflow_dispatch" ]]; then
30+
VERSION="$VERSION_INPUT"
31+
else
32+
VERSION="$REF_NAME"
33+
if [[ "$REF_TYPE" != "tag" ]]; then
34+
echo "::error::Release workflow must run on a tag starting with v. Current ref: ${CURRENT_REF}"
35+
exit 1
36+
fi
37+
fi
38+
39+
if [[ ! "$VERSION" =~ ^v ]]; then
40+
echo "::error::Image version must start with v. Current value: ${VERSION}"
2441
exit 1
2542
fi
43+
2644
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
2745
2846
build-fastgpt-code-sandbox-images:
@@ -134,24 +152,25 @@ jobs:
134152
135153
- name: Create manifest list and push
136154
working-directory: ${{ runner.temp }}/digests
155+
timeout-minutes: 30
137156
run: |
138157
retry_imagetools_create() {
139158
local tag="$1"
140159
local sources
141160
sources="$(printf 'ghcr.io/${{ github.repository_owner }}/fastgpt-code-sandbox@sha256:%s ' *)"
142161
143-
for attempt in 1 2 3 4; do
162+
for attempt in 1 2 3 4 5 6; do
144163
if docker buildx imagetools create -t "$tag" $sources; then
145164
return 0
146165
fi
147166
148-
if [ "$attempt" -eq 4 ]; then
149-
echo "::error::Failed to push manifest ${tag} after 3 retries."
167+
if [ "$attempt" -eq 6 ]; then
168+
echo "::error::Failed to push manifest ${tag} after 5 retries."
150169
return 1
151170
fi
152171
153-
echo "::warning::Failed to push manifest ${tag}; retrying in $((attempt * 15)) seconds (${attempt}/3)."
154-
sleep $((attempt * 15))
172+
echo "::warning::Failed to push manifest ${tag}; retrying in $((attempt * 60)) seconds (${attempt}/5)."
173+
sleep $((attempt * 60))
155174
done
156175
}
157176

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
"[typescriptreact]": {
4747
"editor.defaultFormatter": "esbenp.prettier-vscode"
4848
},
49+
"yaml.format.enable": false,
50+
"[yaml]": {
51+
"editor.formatOnSave": false,
52+
},
4953
"mdx.server.enable": true,
5054
"markdown.copyFiles.overwriteBehavior": "nameIncrementally",
5155
"markdown.copyFiles.destination": {

deploy/dev/docker-compose.cn.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ services:
179179
retries: 3
180180
fastgpt-code-sandbox:
181181
container_name: fastgpt-code-sandbox
182-
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-code-sandbox:v4.15.0-beta1
182+
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-code-sandbox:v4.15.0
183183
ports:
184184
- 3002:3000
185185
networks:
@@ -235,7 +235,7 @@ services:
235235
retries: 3
236236
fastgpt-mcp-server:
237237
container_name: fastgpt-mcp-server
238-
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.15.0-beta1
238+
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.14.23
239239
ports:
240240
- 3003:3000
241241
networks:
@@ -245,7 +245,7 @@ services:
245245
<<: [*x-no-proxy-config]
246246
FASTGPT_ENDPOINT: http://fastgpt:3000
247247
fastgpt-plugin:
248-
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v0.6.2
248+
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v1.0.0
249249
container_name: fastgpt-plugin
250250
restart: always
251251
ports:
@@ -341,7 +341,7 @@ services:
341341

342342
# AI Proxy
343343
fastgpt-aiproxy:
344-
image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.5.8
344+
image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.6.5
345345
container_name: fastgpt-aiproxy
346346
restart: unless-stopped
347347
ports:

deploy/dev/docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ services:
179179
retries: 3
180180
fastgpt-code-sandbox:
181181
container_name: fastgpt-code-sandbox
182-
image: ghcr.io/labring/fastgpt-code-sandbox:v4.15.0-beta1
182+
image: ghcr.io/labring/fastgpt-code-sandbox:v4.15.0
183183
ports:
184184
- 3002:3000
185185
networks:
@@ -235,7 +235,7 @@ services:
235235
retries: 3
236236
fastgpt-mcp-server:
237237
container_name: fastgpt-mcp-server
238-
image: ghcr.io/labring/fastgpt-mcp_server:v4.15.0-beta1
238+
image: ghcr.io/labring/fastgpt-mcp_server:v4.14.23
239239
ports:
240240
- 3003:3000
241241
networks:
@@ -245,7 +245,7 @@ services:
245245
<<: [*x-no-proxy-config]
246246
FASTGPT_ENDPOINT: http://fastgpt:3000
247247
fastgpt-plugin:
248-
image: ghcr.io/labring/fastgpt-plugin:v0.6.2
248+
image: ghcr.io/labring/fastgpt-plugin:v1.0.0
249249
container_name: fastgpt-plugin
250250
restart: always
251251
ports:
@@ -341,7 +341,7 @@ services:
341341

342342
# AI Proxy
343343
fastgpt-aiproxy:
344-
image: ghcr.io/labring/aiproxy:v0.5.8
344+
image: ghcr.io/labring/aiproxy:v0.6.5
345345
container_name: fastgpt-aiproxy
346346
restart: unless-stopped
347347
ports:

deploy/init.mjs

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,18 +175,20 @@ const loadArgs = (version) => {
175175
};
176176

177177
/**
178-
* replace all ${{}}
178+
* 替换模板中的占位符。
179+
*
180+
* YAML 块占位符应写成独立注释行(如 `# ${{vec.db}}`),这样模板文件本身
181+
* 仍能按 YAML 解析;普通镜像/tag 变量仍可写在行内。
182+
*
179183
* @param {string} source
180184
* @param {RegionEnum} region
181185
* @param {string | undefined} vec
182186
* @param {Record<Services, ArgItemType>} args
183-
* @param {Record<string, { filename: string, db: string, config: string, extra: string }>} vectors
187+
* @param {Record<string, { filename: string, db: string, config: string, extra: string, extraBlock: string }>} vectors
184188
* @returns {string}
185189
*/
186190
const replace = (source, region, vec, args, vectors) => {
187-
// Match ${{expr}}, capture "expr" inside {{}}
188-
return source.replace(/\$\{\{([^}]*)\}\}/g, (_, expr) => {
189-
// expr: a.b
191+
const resolveExpr = (expr) => {
190192
/**
191193
* @type {String}
192194
*/
@@ -208,7 +210,14 @@ const replace = (source, region, vec, args, vectors) => {
208210
} else if (b === 'image') {
209211
return args[a].image[region];
210212
}
211-
});
213+
};
214+
215+
return source
216+
.replace(/^[^\S\r\n]*#\s*\$\{\{([^}]*)\}\}[^\S\r\n]*(?:\r?\n|$)/gm, (_, expr) => {
217+
const value = resolveExpr(expr);
218+
return value ? `${value}\n` : '';
219+
})
220+
.replace(/\$\{\{([^}]*)\}\}/g, (_, expr) => resolveExpr(expr));
212221
};
213222

214223
const formatYamlOutput = (source) => `${source.trimEnd()}\n`;

deploy/version/main/args.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"tags": {
3-
"fastgpt": "v4.15.0-beta1",
4-
"fastgpt-code-sandbox": "v4.15.0-beta1",
5-
"fastgpt-mcp_server": "v4.15.0-beta1",
6-
"fastgpt-plugin": "v0.6.2",
3+
"fastgpt": "v4.15.0",
4+
"fastgpt-code-sandbox": "v4.15.0",
5+
"fastgpt-plugin": "v1.0.0",
76
"volume-manager": "v0.2.0",
87
"agent-sandbox-image": "v0.2.0",
9-
"aiproxy": "v0.5.8",
8+
"aiproxy": "v0.6.5",
9+
"fastgpt-mcp_server": "v4.14.23",
1010

1111
"opensandbox-server": "v0.1.9",
1212
"opensandbox-execd": "v1.0.7",

deploy/version/main/docker-compose.template.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,10 @@ x-no-proxy-config: &x-no-proxy-config
4444

4545
# 向量库相关配置
4646
x-vec-config: &x-vec-config
47-
${{vec.config}}
47+
# ${{vec.config}}
4848

4949
services:
50-
# Vector DB
51-
${{vec.db}}
50+
# ${{vec.db}}
5251
fastgpt-mongo:
5352
image: ${{mongo.image}}:${{mongo.tag}} # cpu 不支持 AVX 时候使用 4.4.29
5453
container_name: fastgpt-mongo
@@ -232,11 +231,6 @@ ${{vec.db}}
232231
networks:
233232
- codesandbox
234233
restart: always
235-
read_only: true
236-
tmpfs:
237-
- /tmp:size=128m,noexec,nosuid,nodev
238-
cap_drop:
239-
- ALL
240234
security_opt:
241235
- no-new-privileges:true
242236
environment:

deploy/version/v4.14/args.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"tags": {
33
"fastgpt": "v4.14.26",
44
"fastgpt-code-sandbox": "v4.14.22",
5-
"fastgpt-mcp_server": "v4.14.22",
5+
"fastgpt-mcp_server": "v4.14.23",
66
"fastgpt-plugin": "v0.6.2",
77
"volume-manager": "v0.1.2",
88
"agent-sandbox-image": "v0.1.2",

deploy/version/v4.14/docker-compose.template.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,10 @@ x-no-proxy-config: &x-no-proxy-config
4646

4747
# 向量库相关配置
4848
x-vec-config: &x-vec-config
49-
${{vec.config}}
49+
# ${{vec.config}}
5050

5151
services:
52-
# Vector DB
53-
${{vec.db}}
52+
# ${{vec.db}}
5453
fastgpt-mongo:
5554
image: ${{mongo.image}}:${{mongo.tag}} # cpu 不支持 AVX 时候使用 4.4.29
5655
container_name: fastgpt-mongo

deploy/version/v4.15/args.json

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"tags": {
3+
"fastgpt": "v4.15.0",
4+
"fastgpt-code-sandbox": "v4.15.0",
5+
"fastgpt-plugin": "v1.0.0",
6+
"volume-manager": "v0.2.0",
7+
"agent-sandbox-image": "v0.2.0",
8+
"agent-sandbox-proxy": "v0.2.0",
9+
"aiproxy": "v0.6.5",
10+
"fastgpt-mcp_server": "v4.14.23",
11+
12+
"aiproxy-pg": "0.8.0-pg15",
13+
"mongo": "5.0.32",
14+
"redis": "7.2-alpine",
15+
"minio": "RELEASE.2025-09-07T16-13-09Z",
16+
"pg": "0.8.0-pg15",
17+
"milvus-minio": "RELEASE.2023-03-20T20-16-18Z",
18+
"milvus-etcd": "v3.5.5",
19+
"milvus-standalone": "v2.4.3",
20+
"oceanbase": "4.3.5-lts",
21+
"seekdb": "1.0.1.0-100000392025122619"
22+
},
23+
"images": {
24+
"cn": {
25+
"fastgpt": "registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt",
26+
"fastgpt-plugin": "registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin",
27+
"fastgpt-code-sandbox": "registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-code-sandbox",
28+
"fastgpt-mcp_server": "registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server",
29+
"volume-manager": "registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-volume-manager",
30+
"agent-sandbox-image": "registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-sandbox",
31+
"agent-sandbox-proxy": "registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-sandbox-proxy",
32+
"opensandbox-server": "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-server",
33+
"opensandbox-execd": "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-execd",
34+
"opensandbox-egress": "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-egress",
35+
"aiproxy": "registry.cn-hangzhou.aliyuncs.com/labring/aiproxy",
36+
"aiproxy-pg": "registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector",
37+
"mongo": "registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo",
38+
"redis": "registry.cn-hangzhou.aliyuncs.com/fastgpt/redis",
39+
"minio": "registry.cn-hangzhou.aliyuncs.com/fastgpt/minio",
40+
"pg": "registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector",
41+
"milvus-minio": "minio/minio",
42+
"milvus-etcd": "quay.io/coreos/etcd",
43+
"milvus-standalone": "milvusdb/milvus",
44+
"oceanbase": "oceanbase/oceanbase-ce",
45+
"seekdb": "oceanbase/seekdb"
46+
},
47+
"global": {
48+
"fastgpt": "ghcr.io/labring/fastgpt",
49+
"fastgpt-plugin": "ghcr.io/labring/fastgpt-plugin",
50+
"fastgpt-code-sandbox": "ghcr.io/labring/fastgpt-code-sandbox",
51+
"fastgpt-mcp_server": "ghcr.io/labring/fastgpt-mcp_server",
52+
"volume-manager": "ghcr.io/labring/fastgpt-agent-volume-manager",
53+
"agent-sandbox-image": "ghcr.io/labring/fastgpt-agent-sandbox",
54+
"agent-sandbox-proxy": "ghcr.io/labring/fastgpt-agent-sandbox-proxy",
55+
"opensandbox-server": "opensandbox/server",
56+
"opensandbox-execd": "opensandbox/execd",
57+
"opensandbox-egress": "opensandbox/egress",
58+
"aiproxy": "ghcr.io/labring/aiproxy",
59+
"aiproxy-pg": "pgvector/pgvector",
60+
"mongo": "mongo",
61+
"redis": "redis",
62+
"minio": "minio/minio",
63+
"pg": "pgvector/pgvector",
64+
"milvus-minio": "minio/minio",
65+
"milvus-etcd": "quay.io/coreos/etcd",
66+
"milvus-standalone": "milvusdb/milvus",
67+
"oceanbase": "oceanbase/oceanbase-ce",
68+
"seekdb": "oceanbase/seekdb"
69+
}
70+
}
71+
}

0 commit comments

Comments
 (0)