@@ -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
5156services :
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
0 commit comments