Skip to content

Commit 22ebfac

Browse files
authored
perf: yml proxy (#6975)
* perf: deploy * doc * noproxy
1 parent 1058acd commit 22ebfac

16 files changed

Lines changed: 150 additions & 61 deletions

deploy/dev/docker-compose.cn.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ x-log-config: &x-log-config
4747
LOG_ENABLE_OTEL: false
4848
LOG_OTEL_LEVEL: info
4949
LOG_OTEL_URL: http://localhost:4318/v1/logs
50+
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
51+
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
52+
x-no-proxy-config: &x-no-proxy-config
53+
NO_PROXY: localhost,127.0.0.1,::1,fastgpt,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-pg,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
54+
no_proxy: localhost,127.0.0.1,::1,fastgpt,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-pg,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
5055

5156
services:
5257
# Vector DB
@@ -181,7 +186,7 @@ services:
181186
- fastgpt
182187
restart: always
183188
environment:
184-
<<: [*x-log-config]
189+
<<: [*x-log-config, *x-no-proxy-config]
185190
LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox
186191
SANDBOX_TOKEN: *x-code-sandbox-token
187192
# ===== Resource Limits =====
@@ -227,7 +232,8 @@ services:
227232
- fastgpt
228233
restart: always
229234
environment:
230-
- FASTGPT_ENDPOINT=http://fastgpt:3000
235+
<<: [*x-no-proxy-config]
236+
FASTGPT_ENDPOINT: http://fastgpt:3000
231237
fastgpt-plugin:
232238
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v0.6.2
233239
container_name: fastgpt-plugin
@@ -237,7 +243,7 @@ services:
237243
networks:
238244
- fastgpt
239245
environment:
240-
<<: [*x-share-db-config, *x-log-config]
246+
<<: [*x-share-db-config, *x-log-config, *x-no-proxy-config]
241247
AUTH_TOKEN: *x-plugin-auth-token
242248
# 工具网络请求,最大请求和响应体
243249
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
@@ -273,6 +279,7 @@ services:
273279
- source: opensandbox-config
274280
target: /etc/opensandbox/config.toml
275281
environment:
282+
<<: [*x-no-proxy-config]
276283
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
277284
healthcheck:
278285
test: ['CMD', 'curl', '-f', 'http://localhost:8090/health']
@@ -304,6 +311,7 @@ services:
304311
volumes:
305312
- /var/run/docker.sock:/var/run/docker.sock:ro # Docker 模式必须挂载(只读即可)
306313
environment:
314+
<<: [*x-no-proxy-config]
307315
PORT: 3000
308316
VM_RUNTIME: docker
309317
VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN

deploy/dev/docker-compose.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ x-log-config: &x-log-config
4747
LOG_ENABLE_OTEL: false
4848
LOG_OTEL_LEVEL: info
4949
LOG_OTEL_URL: http://localhost:4318/v1/logs
50+
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
51+
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
52+
x-no-proxy-config: &x-no-proxy-config
53+
NO_PROXY: localhost,127.0.0.1,::1,fastgpt,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-pg,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
54+
no_proxy: localhost,127.0.0.1,::1,fastgpt,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-pg,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
5055

5156
services:
5257
# Vector DB
@@ -181,7 +186,7 @@ services:
181186
- fastgpt
182187
restart: always
183188
environment:
184-
<<: [*x-log-config]
189+
<<: [*x-log-config, *x-no-proxy-config]
185190
LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox
186191
SANDBOX_TOKEN: *x-code-sandbox-token
187192
# ===== Resource Limits =====
@@ -227,7 +232,8 @@ services:
227232
- fastgpt
228233
restart: always
229234
environment:
230-
- FASTGPT_ENDPOINT=http://fastgpt:3000
235+
<<: [*x-no-proxy-config]
236+
FASTGPT_ENDPOINT: http://fastgpt:3000
231237
fastgpt-plugin:
232238
image: ghcr.io/labring/fastgpt-plugin:v0.6.2
233239
container_name: fastgpt-plugin
@@ -237,7 +243,7 @@ services:
237243
networks:
238244
- fastgpt
239245
environment:
240-
<<: [*x-share-db-config, *x-log-config]
246+
<<: [*x-share-db-config, *x-log-config, *x-no-proxy-config]
241247
AUTH_TOKEN: *x-plugin-auth-token
242248
# 工具网络请求,最大请求和响应体
243249
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
@@ -273,6 +279,7 @@ services:
273279
- source: opensandbox-config
274280
target: /etc/opensandbox/config.toml
275281
environment:
282+
<<: [*x-no-proxy-config]
276283
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
277284
healthcheck:
278285
test: ['CMD', 'curl', '-f', 'http://localhost:8090/health']
@@ -304,6 +311,7 @@ services:
304311
volumes:
305312
- /var/run/docker.sock:/var/run/docker.sock:ro # Docker 模式必须挂载(只读即可)
306313
environment:
314+
<<: [*x-no-proxy-config]
307315
PORT: 3000
308316
VM_RUNTIME: docker
309317
VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN

deploy/templates/docker-compose.dev.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ x-log-config: &x-log-config
4747
LOG_ENABLE_OTEL: false
4848
LOG_OTEL_LEVEL: info
4949
LOG_OTEL_URL: http://localhost:4318/v1/logs
50+
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
51+
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
52+
x-no-proxy-config: &x-no-proxy-config
53+
NO_PROXY: localhost,127.0.0.1,::1,fastgpt,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-pg,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
54+
no_proxy: localhost,127.0.0.1,::1,fastgpt,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-pg,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
5055

5156
services:
5257
# Vector DB
@@ -181,7 +186,7 @@ services:
181186
- fastgpt
182187
restart: always
183188
environment:
184-
<<: [*x-log-config]
189+
<<: [*x-log-config, *x-no-proxy-config]
185190
LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox
186191
SANDBOX_TOKEN: *x-code-sandbox-token
187192
# ===== Resource Limits =====
@@ -227,7 +232,8 @@ services:
227232
- fastgpt
228233
restart: always
229234
environment:
230-
- FASTGPT_ENDPOINT=http://fastgpt:3000
235+
<<: [*x-no-proxy-config]
236+
FASTGPT_ENDPOINT: http://fastgpt:3000
231237
fastgpt-plugin:
232238
image: ${{fastgpt-plugin.image}}:${{fastgpt-plugin.tag}}
233239
container_name: fastgpt-plugin
@@ -237,7 +243,7 @@ services:
237243
networks:
238244
- fastgpt
239245
environment:
240-
<<: [*x-share-db-config, *x-log-config]
246+
<<: [*x-share-db-config, *x-log-config, *x-no-proxy-config]
241247
AUTH_TOKEN: *x-plugin-auth-token
242248
# 工具网络请求,最大请求和响应体
243249
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
@@ -273,6 +279,7 @@ services:
273279
- source: opensandbox-config
274280
target: /etc/opensandbox/config.toml
275281
environment:
282+
<<: [*x-no-proxy-config]
276283
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
277284
healthcheck:
278285
test: ['CMD', 'curl', '-f', 'http://localhost:8090/health']
@@ -304,6 +311,7 @@ services:
304311
volumes:
305312
- /var/run/docker.sock:/var/run/docker.sock:ro # Docker 模式必须挂载(只读即可)
306313
environment:
314+
<<: [*x-no-proxy-config]
307315
PORT: 3000
308316
VM_RUNTIME: docker
309317
VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ x-log-config: &x-log-config
3636
LOG_ENABLE_OTEL: false
3737
LOG_OTEL_LEVEL: info
3838
LOG_OTEL_URL: http://localhost:4318/v1/logs
39+
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
40+
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
41+
x-no-proxy-config: &x-no-proxy-config
42+
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
43+
no_proxy: localhost,127.0.0.1,::1,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
3944

4045
# 向量库相关配置
4146
x-vec-config: &x-vec-config
@@ -155,7 +160,7 @@ ${{vec.db}}
155160
restart: always
156161
environment:
157162
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
158-
<<: [*x-share-db-config, *x-vec-config, *x-log-config]
163+
<<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
159164
HOSTNAME: 0.0.0.0
160165
# ==================== 基础配置 ====================
161166
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。
@@ -200,7 +205,7 @@ ${{vec.db}}
200205
- codesandbox
201206
restart: always
202207
environment:
203-
<<: [*x-log-config]
208+
<<: [*x-log-config, *x-no-proxy-config]
204209
LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox
205210
SANDBOX_TOKEN: *x-code-sandbox-token
206211
# ===== Resource Limits =====
@@ -251,7 +256,7 @@ ${{vec.db}}
251256
- 3003:3000
252257
restart: always
253258
environment:
254-
<<: [*x-log-config]
259+
<<: [*x-log-config, *x-no-proxy-config]
255260
FASTGPT_ENDPOINT: http://fastgpt-app:3000
256261
fastgpt-plugin:
257262
image: ${{fastgpt-plugin.image}}:${{fastgpt-plugin.tag}}
@@ -261,7 +266,7 @@ ${{vec.db}}
261266
- data
262267
- app
263268
environment:
264-
<<: [*x-share-db-config, *x-log-config]
269+
<<: [*x-share-db-config, *x-log-config, *x-no-proxy-config]
265270
AUTH_TOKEN: *x-plugin-auth-token
266271
# 工具网络请求,最大请求和响应体
267272
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10

document/public/deploy/docker/main/cn/docker-compose.milvus.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ x-log-config: &x-log-config
3636
LOG_ENABLE_OTEL: false
3737
LOG_OTEL_LEVEL: info
3838
LOG_OTEL_URL: http://localhost:4318/v1/logs
39+
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
40+
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
41+
x-no-proxy-config: &x-no-proxy-config
42+
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
43+
no_proxy: localhost,127.0.0.1,::1,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
3944

4045
# 向量库相关配置
4146
x-vec-config: &x-vec-config
@@ -212,7 +217,7 @@ services:
212217
restart: always
213218
environment:
214219
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
215-
<<: [*x-share-db-config, *x-vec-config, *x-log-config]
220+
<<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
216221
HOSTNAME: 0.0.0.0
217222
# ==================== 基础配置 ====================
218223
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。
@@ -257,7 +262,7 @@ services:
257262
- codesandbox
258263
restart: always
259264
environment:
260-
<<: [*x-log-config]
265+
<<: [*x-log-config, *x-no-proxy-config]
261266
LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox
262267
SANDBOX_TOKEN: *x-code-sandbox-token
263268
# ===== Resource Limits =====
@@ -308,7 +313,7 @@ services:
308313
- 3003:3000
309314
restart: always
310315
environment:
311-
<<: [*x-log-config]
316+
<<: [*x-log-config, *x-no-proxy-config]
312317
FASTGPT_ENDPOINT: http://fastgpt-app:3000
313318
fastgpt-plugin:
314319
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v0.6.2
@@ -318,7 +323,7 @@ services:
318323
- data
319324
- app
320325
environment:
321-
<<: [*x-share-db-config, *x-log-config]
326+
<<: [*x-share-db-config, *x-log-config, *x-no-proxy-config]
322327
AUTH_TOKEN: *x-plugin-auth-token
323328
# 工具网络请求,最大请求和响应体
324329
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10

document/public/deploy/docker/main/cn/docker-compose.oceanbase.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ x-log-config: &x-log-config
3636
LOG_ENABLE_OTEL: false
3737
LOG_OTEL_LEVEL: info
3838
LOG_OTEL_URL: http://localhost:4318/v1/logs
39+
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
40+
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
41+
x-no-proxy-config: &x-no-proxy-config
42+
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
43+
no_proxy: localhost,127.0.0.1,::1,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
3944

4045
# 向量库相关配置
4146
x-vec-config: &x-vec-config
@@ -190,7 +195,7 @@ services:
190195
restart: always
191196
environment:
192197
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
193-
<<: [*x-share-db-config, *x-vec-config, *x-log-config]
198+
<<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
194199
HOSTNAME: 0.0.0.0
195200
# ==================== 基础配置 ====================
196201
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。
@@ -235,7 +240,7 @@ services:
235240
- codesandbox
236241
restart: always
237242
environment:
238-
<<: [*x-log-config]
243+
<<: [*x-log-config, *x-no-proxy-config]
239244
LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox
240245
SANDBOX_TOKEN: *x-code-sandbox-token
241246
# ===== Resource Limits =====
@@ -286,7 +291,7 @@ services:
286291
- 3003:3000
287292
restart: always
288293
environment:
289-
<<: [*x-log-config]
294+
<<: [*x-log-config, *x-no-proxy-config]
290295
FASTGPT_ENDPOINT: http://fastgpt-app:3000
291296
fastgpt-plugin:
292297
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v0.6.2
@@ -296,7 +301,7 @@ services:
296301
- data
297302
- app
298303
environment:
299-
<<: [*x-share-db-config, *x-log-config]
304+
<<: [*x-share-db-config, *x-log-config, *x-no-proxy-config]
300305
AUTH_TOKEN: *x-plugin-auth-token
301306
# 工具网络请求,最大请求和响应体
302307
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10

document/public/deploy/docker/main/cn/docker-compose.opengauss.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ x-log-config: &x-log-config
3636
LOG_ENABLE_OTEL: false
3737
LOG_OTEL_LEVEL: info
3838
LOG_OTEL_URL: http://localhost:4318/v1/logs
39+
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
40+
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
41+
x-no-proxy-config: &x-no-proxy-config
42+
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
43+
no_proxy: localhost,127.0.0.1,::1,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
3944

4045
# 向量库相关配置
4146
x-vec-config: &x-vec-config
@@ -174,7 +179,7 @@ services:
174179
restart: always
175180
environment:
176181
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
177-
<<: [*x-share-db-config, *x-vec-config, *x-log-config]
182+
<<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
178183
HOSTNAME: 0.0.0.0
179184
# ==================== 基础配置 ====================
180185
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。
@@ -219,7 +224,7 @@ services:
219224
- codesandbox
220225
restart: always
221226
environment:
222-
<<: [*x-log-config]
227+
<<: [*x-log-config, *x-no-proxy-config]
223228
LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox
224229
SANDBOX_TOKEN: *x-code-sandbox-token
225230
# ===== Resource Limits =====
@@ -270,7 +275,7 @@ services:
270275
- 3003:3000
271276
restart: always
272277
environment:
273-
<<: [*x-log-config]
278+
<<: [*x-log-config, *x-no-proxy-config]
274279
FASTGPT_ENDPOINT: http://fastgpt-app:3000
275280
fastgpt-plugin:
276281
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v0.6.2
@@ -280,7 +285,7 @@ services:
280285
- data
281286
- app
282287
environment:
283-
<<: [*x-share-db-config, *x-log-config]
288+
<<: [*x-share-db-config, *x-log-config, *x-no-proxy-config]
284289
AUTH_TOKEN: *x-plugin-auth-token
285290
# 工具网络请求,最大请求和响应体
286291
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10

0 commit comments

Comments
 (0)