Commit 805e32d7 by Archer Committed by GitHub

fix: network (#7014)

parent 5ba07c91
...@@ -38,6 +38,11 @@ x-log-config: &x-log-config ...@@ -38,6 +38,11 @@ x-log-config: &x-log-config
LOG_ENABLE_OTEL: false LOG_ENABLE_OTEL: false
LOG_OTEL_LEVEL: info LOG_OTEL_LEVEL: info
LOG_OTEL_URL: http://localhost:4318/v1/logs LOG_OTEL_URL: http://localhost:4318/v1/logs
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
x-no-proxy-config: &x-no-proxy-config
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
# 向量库相关配置 # 向量库相关配置
x-vec-config: &x-vec-config x-vec-config: &x-vec-config
...@@ -158,7 +163,7 @@ ${{vec.db}} ...@@ -158,7 +163,7 @@ ${{vec.db}}
restart: always restart: always
environment: environment:
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template # 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
<<: [*x-share-db-config, *x-vec-config, *x-log-config] <<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
HOSTNAME: 0.0.0.0 HOSTNAME: 0.0.0.0
# ==================== 基础配置 ==================== # ==================== 基础配置 ====================
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。 # 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。
...@@ -218,7 +223,7 @@ ${{vec.db}} ...@@ -218,7 +223,7 @@ ${{vec.db}}
- codesandbox - codesandbox
restart: always restart: always
environment: environment:
<<: [*x-log-config] <<: [*x-log-config, *x-no-proxy-config]
LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox
SANDBOX_TOKEN: *x-code-sandbox-token SANDBOX_TOKEN: *x-code-sandbox-token
# ===== Resource Limits ===== # ===== Resource Limits =====
...@@ -279,7 +284,7 @@ ${{vec.db}} ...@@ -279,7 +284,7 @@ ${{vec.db}}
- data - data
- app - app
environment: environment:
<<: [*x-share-db-config, *x-log-config] <<: [*x-share-db-config, *x-log-config, *x-no-proxy-config]
AUTH_TOKEN: *x-plugin-auth-token AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体 # 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10 SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
...@@ -315,6 +320,7 @@ ${{vec.db}} ...@@ -315,6 +320,7 @@ ${{vec.db}}
- source: opensandbox-config - source: opensandbox-config
target: /etc/opensandbox/config.toml target: /etc/opensandbox/config.toml
environment: environment:
<<: [*x-no-proxy-config]
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck: healthcheck:
test: test:
...@@ -350,6 +356,7 @@ ${{vec.db}} ...@@ -350,6 +356,7 @@ ${{vec.db}}
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致 - /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致
environment: environment:
<<: [*x-no-proxy-config]
PORT: 3000 PORT: 3000
VM_RUNTIME: docker VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN
...@@ -447,7 +454,6 @@ configs: ...@@ -447,7 +454,6 @@ configs:
host = "0.0.0.0" host = "0.0.0.0"
port = 8090 port = 8090
log_level = "INFO" log_level = "INFO"
[runtime] [runtime]
type = "docker" type = "docker"
execd_image = "${{opensandbox-execd.image}}:${{opensandbox-execd.tag}}" execd_image = "${{opensandbox-execd.image}}:${{opensandbox-execd.tag}}"
...@@ -456,7 +462,7 @@ configs: ...@@ -456,7 +462,7 @@ configs:
image = "${{opensandbox-egress.image}}:${{opensandbox-egress.tag}}" image = "${{opensandbox-egress.image}}:${{opensandbox-egress.tag}}"
[docker] [docker]
network_mode = "fastgpt_opensandbox" network_mode = "bridge"
# When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP). # When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP).
# It's required when server deployed with docker container under host. # It's required when server deployed with docker container under host.
host_ip = "host.docker.internal" host_ip = "host.docker.internal"
......
...@@ -38,6 +38,11 @@ x-log-config: &x-log-config ...@@ -38,6 +38,11 @@ x-log-config: &x-log-config
LOG_ENABLE_OTEL: false LOG_ENABLE_OTEL: false
LOG_OTEL_LEVEL: info LOG_OTEL_LEVEL: info
LOG_OTEL_URL: http://localhost:4318/v1/logs LOG_OTEL_URL: http://localhost:4318/v1/logs
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
x-no-proxy-config: &x-no-proxy-config
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
# 向量库相关配置 # 向量库相关配置
x-vec-config: &x-vec-config x-vec-config: &x-vec-config
...@@ -215,7 +220,7 @@ services: ...@@ -215,7 +220,7 @@ services:
restart: always restart: always
environment: environment:
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template # 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
<<: [*x-share-db-config, *x-vec-config, *x-log-config] <<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
HOSTNAME: 0.0.0.0 HOSTNAME: 0.0.0.0
# ==================== 基础配置 ==================== # ==================== 基础配置 ====================
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。 # 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。
...@@ -275,7 +280,7 @@ services: ...@@ -275,7 +280,7 @@ services:
- codesandbox - codesandbox
restart: always restart: always
environment: environment:
<<: [*x-log-config] <<: [*x-log-config, *x-no-proxy-config]
LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox
SANDBOX_TOKEN: *x-code-sandbox-token SANDBOX_TOKEN: *x-code-sandbox-token
# ===== Resource Limits ===== # ===== Resource Limits =====
...@@ -336,7 +341,7 @@ services: ...@@ -336,7 +341,7 @@ services:
- data - data
- app - app
environment: environment:
<<: [*x-share-db-config, *x-log-config] <<: [*x-share-db-config, *x-log-config, *x-no-proxy-config]
AUTH_TOKEN: *x-plugin-auth-token AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体 # 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10 SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
...@@ -372,6 +377,7 @@ services: ...@@ -372,6 +377,7 @@ services:
- source: opensandbox-config - source: opensandbox-config
target: /etc/opensandbox/config.toml target: /etc/opensandbox/config.toml
environment: environment:
<<: [*x-no-proxy-config]
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck: healthcheck:
test: test:
...@@ -407,6 +413,7 @@ services: ...@@ -407,6 +413,7 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致 - /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致
environment: environment:
<<: [*x-no-proxy-config]
PORT: 3000 PORT: 3000
VM_RUNTIME: docker VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN
...@@ -504,7 +511,6 @@ configs: ...@@ -504,7 +511,6 @@ configs:
host = "0.0.0.0" host = "0.0.0.0"
port = 8090 port = 8090
log_level = "INFO" log_level = "INFO"
[runtime] [runtime]
type = "docker" type = "docker"
execd_image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-execd:v1.0.7" execd_image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-execd:v1.0.7"
...@@ -513,7 +519,7 @@ configs: ...@@ -513,7 +519,7 @@ configs:
image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-egress:v1.0.3" image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-egress:v1.0.3"
[docker] [docker]
network_mode = "fastgpt_opensandbox" network_mode = "bridge"
# When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP). # When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP).
# It's required when server deployed with docker container under host. # It's required when server deployed with docker container under host.
host_ip = "host.docker.internal" host_ip = "host.docker.internal"
......
...@@ -38,6 +38,11 @@ x-log-config: &x-log-config ...@@ -38,6 +38,11 @@ x-log-config: &x-log-config
LOG_ENABLE_OTEL: false LOG_ENABLE_OTEL: false
LOG_OTEL_LEVEL: info LOG_OTEL_LEVEL: info
LOG_OTEL_URL: http://localhost:4318/v1/logs LOG_OTEL_URL: http://localhost:4318/v1/logs
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
x-no-proxy-config: &x-no-proxy-config
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
# 向量库相关配置 # 向量库相关配置
x-vec-config: &x-vec-config x-vec-config: &x-vec-config
...@@ -193,7 +198,7 @@ services: ...@@ -193,7 +198,7 @@ services:
restart: always restart: always
environment: environment:
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template # 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
<<: [*x-share-db-config, *x-vec-config, *x-log-config] <<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
HOSTNAME: 0.0.0.0 HOSTNAME: 0.0.0.0
# ==================== 基础配置 ==================== # ==================== 基础配置 ====================
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。 # 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。
...@@ -253,7 +258,7 @@ services: ...@@ -253,7 +258,7 @@ services:
- codesandbox - codesandbox
restart: always restart: always
environment: environment:
<<: [*x-log-config] <<: [*x-log-config, *x-no-proxy-config]
LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox
SANDBOX_TOKEN: *x-code-sandbox-token SANDBOX_TOKEN: *x-code-sandbox-token
# ===== Resource Limits ===== # ===== Resource Limits =====
...@@ -314,7 +319,7 @@ services: ...@@ -314,7 +319,7 @@ services:
- data - data
- app - app
environment: environment:
<<: [*x-share-db-config, *x-log-config] <<: [*x-share-db-config, *x-log-config, *x-no-proxy-config]
AUTH_TOKEN: *x-plugin-auth-token AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体 # 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10 SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
...@@ -350,6 +355,7 @@ services: ...@@ -350,6 +355,7 @@ services:
- source: opensandbox-config - source: opensandbox-config
target: /etc/opensandbox/config.toml target: /etc/opensandbox/config.toml
environment: environment:
<<: [*x-no-proxy-config]
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck: healthcheck:
test: test:
...@@ -385,6 +391,7 @@ services: ...@@ -385,6 +391,7 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致 - /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致
environment: environment:
<<: [*x-no-proxy-config]
PORT: 3000 PORT: 3000
VM_RUNTIME: docker VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN
...@@ -482,7 +489,6 @@ configs: ...@@ -482,7 +489,6 @@ configs:
host = "0.0.0.0" host = "0.0.0.0"
port = 8090 port = 8090
log_level = "INFO" log_level = "INFO"
[runtime] [runtime]
type = "docker" type = "docker"
execd_image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-execd:v1.0.7" execd_image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-execd:v1.0.7"
...@@ -491,7 +497,7 @@ configs: ...@@ -491,7 +497,7 @@ configs:
image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-egress:v1.0.3" image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-egress:v1.0.3"
[docker] [docker]
network_mode = "fastgpt_opensandbox" network_mode = "bridge"
# When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP). # When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP).
# It's required when server deployed with docker container under host. # It's required when server deployed with docker container under host.
host_ip = "host.docker.internal" host_ip = "host.docker.internal"
......
...@@ -38,6 +38,11 @@ x-log-config: &x-log-config ...@@ -38,6 +38,11 @@ x-log-config: &x-log-config
LOG_ENABLE_OTEL: false LOG_ENABLE_OTEL: false
LOG_OTEL_LEVEL: info LOG_OTEL_LEVEL: info
LOG_OTEL_URL: http://localhost:4318/v1/logs LOG_OTEL_URL: http://localhost:4318/v1/logs
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
x-no-proxy-config: &x-no-proxy-config
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
# 向量库相关配置 # 向量库相关配置
x-vec-config: &x-vec-config x-vec-config: &x-vec-config
...@@ -177,7 +182,7 @@ services: ...@@ -177,7 +182,7 @@ services:
restart: always restart: always
environment: environment:
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template # 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
<<: [*x-share-db-config, *x-vec-config, *x-log-config] <<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
HOSTNAME: 0.0.0.0 HOSTNAME: 0.0.0.0
# ==================== 基础配置 ==================== # ==================== 基础配置 ====================
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。 # 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。
...@@ -237,7 +242,7 @@ services: ...@@ -237,7 +242,7 @@ services:
- codesandbox - codesandbox
restart: always restart: always
environment: environment:
<<: [*x-log-config] <<: [*x-log-config, *x-no-proxy-config]
LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox
SANDBOX_TOKEN: *x-code-sandbox-token SANDBOX_TOKEN: *x-code-sandbox-token
# ===== Resource Limits ===== # ===== Resource Limits =====
...@@ -298,7 +303,7 @@ services: ...@@ -298,7 +303,7 @@ services:
- data - data
- app - app
environment: environment:
<<: [*x-share-db-config, *x-log-config] <<: [*x-share-db-config, *x-log-config, *x-no-proxy-config]
AUTH_TOKEN: *x-plugin-auth-token AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体 # 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10 SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
...@@ -334,6 +339,7 @@ services: ...@@ -334,6 +339,7 @@ services:
- source: opensandbox-config - source: opensandbox-config
target: /etc/opensandbox/config.toml target: /etc/opensandbox/config.toml
environment: environment:
<<: [*x-no-proxy-config]
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck: healthcheck:
test: test:
...@@ -369,6 +375,7 @@ services: ...@@ -369,6 +375,7 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致 - /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致
environment: environment:
<<: [*x-no-proxy-config]
PORT: 3000 PORT: 3000
VM_RUNTIME: docker VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN
...@@ -466,7 +473,6 @@ configs: ...@@ -466,7 +473,6 @@ configs:
host = "0.0.0.0" host = "0.0.0.0"
port = 8090 port = 8090
log_level = "INFO" log_level = "INFO"
[runtime] [runtime]
type = "docker" type = "docker"
execd_image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-execd:v1.0.7" execd_image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-execd:v1.0.7"
...@@ -475,7 +481,7 @@ configs: ...@@ -475,7 +481,7 @@ configs:
image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-egress:v1.0.3" image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-egress:v1.0.3"
[docker] [docker]
network_mode = "fastgpt_opensandbox" network_mode = "bridge"
# When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP). # When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP).
# It's required when server deployed with docker container under host. # It's required when server deployed with docker container under host.
host_ip = "host.docker.internal" host_ip = "host.docker.internal"
......
...@@ -38,6 +38,11 @@ x-log-config: &x-log-config ...@@ -38,6 +38,11 @@ x-log-config: &x-log-config
LOG_ENABLE_OTEL: false LOG_ENABLE_OTEL: false
LOG_OTEL_LEVEL: info LOG_OTEL_LEVEL: info
LOG_OTEL_URL: http://localhost:4318/v1/logs LOG_OTEL_URL: http://localhost:4318/v1/logs
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
x-no-proxy-config: &x-no-proxy-config
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
# 向量库相关配置 # 向量库相关配置
x-vec-config: &x-vec-config x-vec-config: &x-vec-config
...@@ -175,7 +180,7 @@ services: ...@@ -175,7 +180,7 @@ services:
restart: always restart: always
environment: environment:
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template # 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
<<: [*x-share-db-config, *x-vec-config, *x-log-config] <<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
HOSTNAME: 0.0.0.0 HOSTNAME: 0.0.0.0
# ==================== 基础配置 ==================== # ==================== 基础配置 ====================
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。 # 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。
...@@ -235,7 +240,7 @@ services: ...@@ -235,7 +240,7 @@ services:
- codesandbox - codesandbox
restart: always restart: always
environment: environment:
<<: [*x-log-config] <<: [*x-log-config, *x-no-proxy-config]
LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox
SANDBOX_TOKEN: *x-code-sandbox-token SANDBOX_TOKEN: *x-code-sandbox-token
# ===== Resource Limits ===== # ===== Resource Limits =====
...@@ -296,7 +301,7 @@ services: ...@@ -296,7 +301,7 @@ services:
- data - data
- app - app
environment: environment:
<<: [*x-share-db-config, *x-log-config] <<: [*x-share-db-config, *x-log-config, *x-no-proxy-config]
AUTH_TOKEN: *x-plugin-auth-token AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体 # 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10 SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
...@@ -332,6 +337,7 @@ services: ...@@ -332,6 +337,7 @@ services:
- source: opensandbox-config - source: opensandbox-config
target: /etc/opensandbox/config.toml target: /etc/opensandbox/config.toml
environment: environment:
<<: [*x-no-proxy-config]
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck: healthcheck:
test: test:
...@@ -367,6 +373,7 @@ services: ...@@ -367,6 +373,7 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致 - /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致
environment: environment:
<<: [*x-no-proxy-config]
PORT: 3000 PORT: 3000
VM_RUNTIME: docker VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN
...@@ -464,7 +471,6 @@ configs: ...@@ -464,7 +471,6 @@ configs:
host = "0.0.0.0" host = "0.0.0.0"
port = 8090 port = 8090
log_level = "INFO" log_level = "INFO"
[runtime] [runtime]
type = "docker" type = "docker"
execd_image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-execd:v1.0.7" execd_image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-execd:v1.0.7"
...@@ -473,7 +479,7 @@ configs: ...@@ -473,7 +479,7 @@ configs:
image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-egress:v1.0.3" image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-egress:v1.0.3"
[docker] [docker]
network_mode = "fastgpt_opensandbox" network_mode = "bridge"
# When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP). # When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP).
# It's required when server deployed with docker container under host. # It's required when server deployed with docker container under host.
host_ip = "host.docker.internal" host_ip = "host.docker.internal"
......
...@@ -38,6 +38,11 @@ x-log-config: &x-log-config ...@@ -38,6 +38,11 @@ x-log-config: &x-log-config
LOG_ENABLE_OTEL: false LOG_ENABLE_OTEL: false
LOG_OTEL_LEVEL: info LOG_OTEL_LEVEL: info
LOG_OTEL_URL: http://localhost:4318/v1/logs LOG_OTEL_URL: http://localhost:4318/v1/logs
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
x-no-proxy-config: &x-no-proxy-config
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
# 向量库相关配置 # 向量库相关配置
x-vec-config: &x-vec-config x-vec-config: &x-vec-config
...@@ -180,7 +185,7 @@ services: ...@@ -180,7 +185,7 @@ services:
restart: always restart: always
environment: environment:
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template # 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
<<: [*x-share-db-config, *x-vec-config, *x-log-config] <<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
HOSTNAME: 0.0.0.0 HOSTNAME: 0.0.0.0
# ==================== 基础配置 ==================== # ==================== 基础配置 ====================
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。 # 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。
...@@ -240,7 +245,7 @@ services: ...@@ -240,7 +245,7 @@ services:
- codesandbox - codesandbox
restart: always restart: always
environment: environment:
<<: [*x-log-config] <<: [*x-log-config, *x-no-proxy-config]
LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox
SANDBOX_TOKEN: *x-code-sandbox-token SANDBOX_TOKEN: *x-code-sandbox-token
# ===== Resource Limits ===== # ===== Resource Limits =====
...@@ -301,7 +306,7 @@ services: ...@@ -301,7 +306,7 @@ services:
- data - data
- app - app
environment: environment:
<<: [*x-share-db-config, *x-log-config] <<: [*x-share-db-config, *x-log-config, *x-no-proxy-config]
AUTH_TOKEN: *x-plugin-auth-token AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体 # 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10 SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
...@@ -337,6 +342,7 @@ services: ...@@ -337,6 +342,7 @@ services:
- source: opensandbox-config - source: opensandbox-config
target: /etc/opensandbox/config.toml target: /etc/opensandbox/config.toml
environment: environment:
<<: [*x-no-proxy-config]
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck: healthcheck:
test: test:
...@@ -372,6 +378,7 @@ services: ...@@ -372,6 +378,7 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致 - /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致
environment: environment:
<<: [*x-no-proxy-config]
PORT: 3000 PORT: 3000
VM_RUNTIME: docker VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN
...@@ -469,7 +476,6 @@ configs: ...@@ -469,7 +476,6 @@ configs:
host = "0.0.0.0" host = "0.0.0.0"
port = 8090 port = 8090
log_level = "INFO" log_level = "INFO"
[runtime] [runtime]
type = "docker" type = "docker"
execd_image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-execd:v1.0.7" execd_image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-execd:v1.0.7"
...@@ -478,7 +484,7 @@ configs: ...@@ -478,7 +484,7 @@ configs:
image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-egress:v1.0.3" image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-egress:v1.0.3"
[docker] [docker]
network_mode = "fastgpt_opensandbox" network_mode = "bridge"
# When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP). # When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP).
# It's required when server deployed with docker container under host. # It's required when server deployed with docker container under host.
host_ip = "host.docker.internal" host_ip = "host.docker.internal"
......
...@@ -38,6 +38,11 @@ x-log-config: &x-log-config ...@@ -38,6 +38,11 @@ x-log-config: &x-log-config
LOG_ENABLE_OTEL: false LOG_ENABLE_OTEL: false
LOG_OTEL_LEVEL: info LOG_OTEL_LEVEL: info
LOG_OTEL_URL: http://localhost:4318/v1/logs LOG_OTEL_URL: http://localhost:4318/v1/logs
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
x-no-proxy-config: &x-no-proxy-config
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
# 向量库相关配置 # 向量库相关配置
x-vec-config: &x-vec-config x-vec-config: &x-vec-config
...@@ -159,7 +164,7 @@ services: ...@@ -159,7 +164,7 @@ services:
restart: always restart: always
environment: environment:
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template # 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
<<: [*x-share-db-config, *x-vec-config, *x-log-config] <<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
HOSTNAME: 0.0.0.0 HOSTNAME: 0.0.0.0
# ==================== 基础配置 ==================== # ==================== 基础配置 ====================
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。 # 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。
...@@ -219,7 +224,7 @@ services: ...@@ -219,7 +224,7 @@ services:
- codesandbox - codesandbox
restart: always restart: always
environment: environment:
<<: [*x-log-config] <<: [*x-log-config, *x-no-proxy-config]
LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox
SANDBOX_TOKEN: *x-code-sandbox-token SANDBOX_TOKEN: *x-code-sandbox-token
# ===== Resource Limits ===== # ===== Resource Limits =====
...@@ -280,7 +285,7 @@ services: ...@@ -280,7 +285,7 @@ services:
- data - data
- app - app
environment: environment:
<<: [*x-share-db-config, *x-log-config] <<: [*x-share-db-config, *x-log-config, *x-no-proxy-config]
AUTH_TOKEN: *x-plugin-auth-token AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体 # 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10 SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
...@@ -316,6 +321,7 @@ services: ...@@ -316,6 +321,7 @@ services:
- source: opensandbox-config - source: opensandbox-config
target: /etc/opensandbox/config.toml target: /etc/opensandbox/config.toml
environment: environment:
<<: [*x-no-proxy-config]
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck: healthcheck:
test: test:
...@@ -351,6 +357,7 @@ services: ...@@ -351,6 +357,7 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致 - /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致
environment: environment:
<<: [*x-no-proxy-config]
PORT: 3000 PORT: 3000
VM_RUNTIME: docker VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN
...@@ -448,7 +455,6 @@ configs: ...@@ -448,7 +455,6 @@ configs:
host = "0.0.0.0" host = "0.0.0.0"
port = 8090 port = 8090
log_level = "INFO" log_level = "INFO"
[runtime] [runtime]
type = "docker" type = "docker"
execd_image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-execd:v1.0.7" execd_image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-execd:v1.0.7"
...@@ -457,7 +463,7 @@ configs: ...@@ -457,7 +463,7 @@ configs:
image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-egress:v1.0.3" image = "registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-egress:v1.0.3"
[docker] [docker]
network_mode = "fastgpt_opensandbox" network_mode = "bridge"
# When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP). # When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP).
# It's required when server deployed with docker container under host. # It's required when server deployed with docker container under host.
host_ip = "host.docker.internal" host_ip = "host.docker.internal"
......
...@@ -38,6 +38,11 @@ x-log-config: &x-log-config ...@@ -38,6 +38,11 @@ x-log-config: &x-log-config
LOG_ENABLE_OTEL: false LOG_ENABLE_OTEL: false
LOG_OTEL_LEVEL: info LOG_OTEL_LEVEL: info
LOG_OTEL_URL: http://localhost:4318/v1/logs LOG_OTEL_URL: http://localhost:4318/v1/logs
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
x-no-proxy-config: &x-no-proxy-config
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
# 向量库相关配置 # 向量库相关配置
x-vec-config: &x-vec-config x-vec-config: &x-vec-config
...@@ -215,7 +220,7 @@ services: ...@@ -215,7 +220,7 @@ services:
restart: always restart: always
environment: environment:
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template # 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
<<: [*x-share-db-config, *x-vec-config, *x-log-config] <<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
HOSTNAME: 0.0.0.0 HOSTNAME: 0.0.0.0
# ==================== 基础配置 ==================== # ==================== 基础配置 ====================
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。 # 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。
...@@ -275,7 +280,7 @@ services: ...@@ -275,7 +280,7 @@ services:
- codesandbox - codesandbox
restart: always restart: always
environment: environment:
<<: [*x-log-config] <<: [*x-log-config, *x-no-proxy-config]
LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox
SANDBOX_TOKEN: *x-code-sandbox-token SANDBOX_TOKEN: *x-code-sandbox-token
# ===== Resource Limits ===== # ===== Resource Limits =====
...@@ -336,7 +341,7 @@ services: ...@@ -336,7 +341,7 @@ services:
- data - data
- app - app
environment: environment:
<<: [*x-share-db-config, *x-log-config] <<: [*x-share-db-config, *x-log-config, *x-no-proxy-config]
AUTH_TOKEN: *x-plugin-auth-token AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体 # 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10 SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
...@@ -372,6 +377,7 @@ services: ...@@ -372,6 +377,7 @@ services:
- source: opensandbox-config - source: opensandbox-config
target: /etc/opensandbox/config.toml target: /etc/opensandbox/config.toml
environment: environment:
<<: [*x-no-proxy-config]
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck: healthcheck:
test: test:
...@@ -407,6 +413,7 @@ services: ...@@ -407,6 +413,7 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致 - /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致
environment: environment:
<<: [*x-no-proxy-config]
PORT: 3000 PORT: 3000
VM_RUNTIME: docker VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN
...@@ -504,7 +511,6 @@ configs: ...@@ -504,7 +511,6 @@ configs:
host = "0.0.0.0" host = "0.0.0.0"
port = 8090 port = 8090
log_level = "INFO" log_level = "INFO"
[runtime] [runtime]
type = "docker" type = "docker"
execd_image = "opensandbox/execd:v1.0.7" execd_image = "opensandbox/execd:v1.0.7"
...@@ -513,7 +519,7 @@ configs: ...@@ -513,7 +519,7 @@ configs:
image = "opensandbox/egress:v1.0.3" image = "opensandbox/egress:v1.0.3"
[docker] [docker]
network_mode = "fastgpt_opensandbox" network_mode = "bridge"
# When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP). # When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP).
# It's required when server deployed with docker container under host. # It's required when server deployed with docker container under host.
host_ip = "host.docker.internal" host_ip = "host.docker.internal"
......
...@@ -38,6 +38,11 @@ x-log-config: &x-log-config ...@@ -38,6 +38,11 @@ x-log-config: &x-log-config
LOG_ENABLE_OTEL: false LOG_ENABLE_OTEL: false
LOG_OTEL_LEVEL: info LOG_OTEL_LEVEL: info
LOG_OTEL_URL: http://localhost:4318/v1/logs LOG_OTEL_URL: http://localhost:4318/v1/logs
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
x-no-proxy-config: &x-no-proxy-config
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
# 向量库相关配置 # 向量库相关配置
x-vec-config: &x-vec-config x-vec-config: &x-vec-config
...@@ -193,7 +198,7 @@ services: ...@@ -193,7 +198,7 @@ services:
restart: always restart: always
environment: environment:
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template # 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
<<: [*x-share-db-config, *x-vec-config, *x-log-config] <<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
HOSTNAME: 0.0.0.0 HOSTNAME: 0.0.0.0
# ==================== 基础配置 ==================== # ==================== 基础配置 ====================
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。 # 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。
...@@ -253,7 +258,7 @@ services: ...@@ -253,7 +258,7 @@ services:
- codesandbox - codesandbox
restart: always restart: always
environment: environment:
<<: [*x-log-config] <<: [*x-log-config, *x-no-proxy-config]
LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox
SANDBOX_TOKEN: *x-code-sandbox-token SANDBOX_TOKEN: *x-code-sandbox-token
# ===== Resource Limits ===== # ===== Resource Limits =====
...@@ -314,7 +319,7 @@ services: ...@@ -314,7 +319,7 @@ services:
- data - data
- app - app
environment: environment:
<<: [*x-share-db-config, *x-log-config] <<: [*x-share-db-config, *x-log-config, *x-no-proxy-config]
AUTH_TOKEN: *x-plugin-auth-token AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体 # 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10 SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
...@@ -350,6 +355,7 @@ services: ...@@ -350,6 +355,7 @@ services:
- source: opensandbox-config - source: opensandbox-config
target: /etc/opensandbox/config.toml target: /etc/opensandbox/config.toml
environment: environment:
<<: [*x-no-proxy-config]
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck: healthcheck:
test: test:
...@@ -385,6 +391,7 @@ services: ...@@ -385,6 +391,7 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致 - /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致
environment: environment:
<<: [*x-no-proxy-config]
PORT: 3000 PORT: 3000
VM_RUNTIME: docker VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN
...@@ -482,7 +489,6 @@ configs: ...@@ -482,7 +489,6 @@ configs:
host = "0.0.0.0" host = "0.0.0.0"
port = 8090 port = 8090
log_level = "INFO" log_level = "INFO"
[runtime] [runtime]
type = "docker" type = "docker"
execd_image = "opensandbox/execd:v1.0.7" execd_image = "opensandbox/execd:v1.0.7"
...@@ -491,7 +497,7 @@ configs: ...@@ -491,7 +497,7 @@ configs:
image = "opensandbox/egress:v1.0.3" image = "opensandbox/egress:v1.0.3"
[docker] [docker]
network_mode = "fastgpt_opensandbox" network_mode = "bridge"
# When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP). # When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP).
# It's required when server deployed with docker container under host. # It's required when server deployed with docker container under host.
host_ip = "host.docker.internal" host_ip = "host.docker.internal"
......
...@@ -38,6 +38,11 @@ x-log-config: &x-log-config ...@@ -38,6 +38,11 @@ x-log-config: &x-log-config
LOG_ENABLE_OTEL: false LOG_ENABLE_OTEL: false
LOG_OTEL_LEVEL: info LOG_OTEL_LEVEL: info
LOG_OTEL_URL: http://localhost:4318/v1/logs LOG_OTEL_URL: http://localhost:4318/v1/logs
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
x-no-proxy-config: &x-no-proxy-config
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
# 向量库相关配置 # 向量库相关配置
x-vec-config: &x-vec-config x-vec-config: &x-vec-config
...@@ -177,7 +182,7 @@ services: ...@@ -177,7 +182,7 @@ services:
restart: always restart: always
environment: environment:
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template # 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
<<: [*x-share-db-config, *x-vec-config, *x-log-config] <<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
HOSTNAME: 0.0.0.0 HOSTNAME: 0.0.0.0
# ==================== 基础配置 ==================== # ==================== 基础配置 ====================
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。 # 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。
...@@ -237,7 +242,7 @@ services: ...@@ -237,7 +242,7 @@ services:
- codesandbox - codesandbox
restart: always restart: always
environment: environment:
<<: [*x-log-config] <<: [*x-log-config, *x-no-proxy-config]
LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox
SANDBOX_TOKEN: *x-code-sandbox-token SANDBOX_TOKEN: *x-code-sandbox-token
# ===== Resource Limits ===== # ===== Resource Limits =====
...@@ -298,7 +303,7 @@ services: ...@@ -298,7 +303,7 @@ services:
- data - data
- app - app
environment: environment:
<<: [*x-share-db-config, *x-log-config] <<: [*x-share-db-config, *x-log-config, *x-no-proxy-config]
AUTH_TOKEN: *x-plugin-auth-token AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体 # 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10 SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
...@@ -334,6 +339,7 @@ services: ...@@ -334,6 +339,7 @@ services:
- source: opensandbox-config - source: opensandbox-config
target: /etc/opensandbox/config.toml target: /etc/opensandbox/config.toml
environment: environment:
<<: [*x-no-proxy-config]
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck: healthcheck:
test: test:
...@@ -369,6 +375,7 @@ services: ...@@ -369,6 +375,7 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致 - /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致
environment: environment:
<<: [*x-no-proxy-config]
PORT: 3000 PORT: 3000
VM_RUNTIME: docker VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN
...@@ -466,7 +473,6 @@ configs: ...@@ -466,7 +473,6 @@ configs:
host = "0.0.0.0" host = "0.0.0.0"
port = 8090 port = 8090
log_level = "INFO" log_level = "INFO"
[runtime] [runtime]
type = "docker" type = "docker"
execd_image = "opensandbox/execd:v1.0.7" execd_image = "opensandbox/execd:v1.0.7"
...@@ -475,7 +481,7 @@ configs: ...@@ -475,7 +481,7 @@ configs:
image = "opensandbox/egress:v1.0.3" image = "opensandbox/egress:v1.0.3"
[docker] [docker]
network_mode = "fastgpt_opensandbox" network_mode = "bridge"
# When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP). # When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP).
# It's required when server deployed with docker container under host. # It's required when server deployed with docker container under host.
host_ip = "host.docker.internal" host_ip = "host.docker.internal"
......
...@@ -38,6 +38,11 @@ x-log-config: &x-log-config ...@@ -38,6 +38,11 @@ x-log-config: &x-log-config
LOG_ENABLE_OTEL: false LOG_ENABLE_OTEL: false
LOG_OTEL_LEVEL: info LOG_OTEL_LEVEL: info
LOG_OTEL_URL: http://localhost:4318/v1/logs LOG_OTEL_URL: http://localhost:4318/v1/logs
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
x-no-proxy-config: &x-no-proxy-config
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
# 向量库相关配置 # 向量库相关配置
x-vec-config: &x-vec-config x-vec-config: &x-vec-config
...@@ -175,7 +180,7 @@ services: ...@@ -175,7 +180,7 @@ services:
restart: always restart: always
environment: environment:
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template # 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
<<: [*x-share-db-config, *x-vec-config, *x-log-config] <<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
HOSTNAME: 0.0.0.0 HOSTNAME: 0.0.0.0
# ==================== 基础配置 ==================== # ==================== 基础配置 ====================
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。 # 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。
...@@ -235,7 +240,7 @@ services: ...@@ -235,7 +240,7 @@ services:
- codesandbox - codesandbox
restart: always restart: always
environment: environment:
<<: [*x-log-config] <<: [*x-log-config, *x-no-proxy-config]
LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox
SANDBOX_TOKEN: *x-code-sandbox-token SANDBOX_TOKEN: *x-code-sandbox-token
# ===== Resource Limits ===== # ===== Resource Limits =====
...@@ -296,7 +301,7 @@ services: ...@@ -296,7 +301,7 @@ services:
- data - data
- app - app
environment: environment:
<<: [*x-share-db-config, *x-log-config] <<: [*x-share-db-config, *x-log-config, *x-no-proxy-config]
AUTH_TOKEN: *x-plugin-auth-token AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体 # 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10 SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
...@@ -332,6 +337,7 @@ services: ...@@ -332,6 +337,7 @@ services:
- source: opensandbox-config - source: opensandbox-config
target: /etc/opensandbox/config.toml target: /etc/opensandbox/config.toml
environment: environment:
<<: [*x-no-proxy-config]
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck: healthcheck:
test: test:
...@@ -367,6 +373,7 @@ services: ...@@ -367,6 +373,7 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致 - /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致
environment: environment:
<<: [*x-no-proxy-config]
PORT: 3000 PORT: 3000
VM_RUNTIME: docker VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN
...@@ -464,7 +471,6 @@ configs: ...@@ -464,7 +471,6 @@ configs:
host = "0.0.0.0" host = "0.0.0.0"
port = 8090 port = 8090
log_level = "INFO" log_level = "INFO"
[runtime] [runtime]
type = "docker" type = "docker"
execd_image = "opensandbox/execd:v1.0.7" execd_image = "opensandbox/execd:v1.0.7"
...@@ -473,7 +479,7 @@ configs: ...@@ -473,7 +479,7 @@ configs:
image = "opensandbox/egress:v1.0.3" image = "opensandbox/egress:v1.0.3"
[docker] [docker]
network_mode = "fastgpt_opensandbox" network_mode = "bridge"
# When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP). # When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP).
# It's required when server deployed with docker container under host. # It's required when server deployed with docker container under host.
host_ip = "host.docker.internal" host_ip = "host.docker.internal"
......
...@@ -38,6 +38,11 @@ x-log-config: &x-log-config ...@@ -38,6 +38,11 @@ x-log-config: &x-log-config
LOG_ENABLE_OTEL: false LOG_ENABLE_OTEL: false
LOG_OTEL_LEVEL: info LOG_OTEL_LEVEL: info
LOG_OTEL_URL: http://localhost:4318/v1/logs LOG_OTEL_URL: http://localhost:4318/v1/logs
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
x-no-proxy-config: &x-no-proxy-config
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
# 向量库相关配置 # 向量库相关配置
x-vec-config: &x-vec-config x-vec-config: &x-vec-config
...@@ -180,7 +185,7 @@ services: ...@@ -180,7 +185,7 @@ services:
restart: always restart: always
environment: environment:
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template # 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
<<: [*x-share-db-config, *x-vec-config, *x-log-config] <<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
HOSTNAME: 0.0.0.0 HOSTNAME: 0.0.0.0
# ==================== 基础配置 ==================== # ==================== 基础配置 ====================
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。 # 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。
...@@ -240,7 +245,7 @@ services: ...@@ -240,7 +245,7 @@ services:
- codesandbox - codesandbox
restart: always restart: always
environment: environment:
<<: [*x-log-config] <<: [*x-log-config, *x-no-proxy-config]
LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox
SANDBOX_TOKEN: *x-code-sandbox-token SANDBOX_TOKEN: *x-code-sandbox-token
# ===== Resource Limits ===== # ===== Resource Limits =====
...@@ -301,7 +306,7 @@ services: ...@@ -301,7 +306,7 @@ services:
- data - data
- app - app
environment: environment:
<<: [*x-share-db-config, *x-log-config] <<: [*x-share-db-config, *x-log-config, *x-no-proxy-config]
AUTH_TOKEN: *x-plugin-auth-token AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体 # 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10 SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
...@@ -337,6 +342,7 @@ services: ...@@ -337,6 +342,7 @@ services:
- source: opensandbox-config - source: opensandbox-config
target: /etc/opensandbox/config.toml target: /etc/opensandbox/config.toml
environment: environment:
<<: [*x-no-proxy-config]
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck: healthcheck:
test: test:
...@@ -372,6 +378,7 @@ services: ...@@ -372,6 +378,7 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致 - /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致
environment: environment:
<<: [*x-no-proxy-config]
PORT: 3000 PORT: 3000
VM_RUNTIME: docker VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN
...@@ -469,7 +476,6 @@ configs: ...@@ -469,7 +476,6 @@ configs:
host = "0.0.0.0" host = "0.0.0.0"
port = 8090 port = 8090
log_level = "INFO" log_level = "INFO"
[runtime] [runtime]
type = "docker" type = "docker"
execd_image = "opensandbox/execd:v1.0.7" execd_image = "opensandbox/execd:v1.0.7"
...@@ -478,7 +484,7 @@ configs: ...@@ -478,7 +484,7 @@ configs:
image = "opensandbox/egress:v1.0.3" image = "opensandbox/egress:v1.0.3"
[docker] [docker]
network_mode = "fastgpt_opensandbox" network_mode = "bridge"
# When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP). # When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP).
# It's required when server deployed with docker container under host. # It's required when server deployed with docker container under host.
host_ip = "host.docker.internal" host_ip = "host.docker.internal"
......
...@@ -38,6 +38,11 @@ x-log-config: &x-log-config ...@@ -38,6 +38,11 @@ x-log-config: &x-log-config
LOG_ENABLE_OTEL: false LOG_ENABLE_OTEL: false
LOG_OTEL_LEVEL: info LOG_OTEL_LEVEL: info
LOG_OTEL_URL: http://localhost:4318/v1/logs LOG_OTEL_URL: http://localhost:4318/v1/logs
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
x-no-proxy-config: &x-no-proxy-config
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,opensandbox-server,fastgpt-volume-manager,host.docker.internal,*.orb.internal,*.orb.local
# 向量库相关配置 # 向量库相关配置
x-vec-config: &x-vec-config x-vec-config: &x-vec-config
...@@ -159,7 +164,7 @@ services: ...@@ -159,7 +164,7 @@ services:
restart: always restart: always
environment: environment:
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template # 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
<<: [*x-share-db-config, *x-vec-config, *x-log-config] <<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
HOSTNAME: 0.0.0.0 HOSTNAME: 0.0.0.0
# ==================== 基础配置 ==================== # ==================== 基础配置 ====================
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。 # 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。
...@@ -219,7 +224,7 @@ services: ...@@ -219,7 +224,7 @@ services:
- codesandbox - codesandbox
restart: always restart: always
environment: environment:
<<: [*x-log-config] <<: [*x-log-config, *x-no-proxy-config]
LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox LOG_OTEL_SERVICE_NAME: fastgpt-code-sandbox
SANDBOX_TOKEN: *x-code-sandbox-token SANDBOX_TOKEN: *x-code-sandbox-token
# ===== Resource Limits ===== # ===== Resource Limits =====
...@@ -280,7 +285,7 @@ services: ...@@ -280,7 +285,7 @@ services:
- data - data
- app - app
environment: environment:
<<: [*x-share-db-config, *x-log-config] <<: [*x-share-db-config, *x-log-config, *x-no-proxy-config]
AUTH_TOKEN: *x-plugin-auth-token AUTH_TOKEN: *x-plugin-auth-token
# 工具网络请求,最大请求和响应体 # 工具网络请求,最大请求和响应体
SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10 SERVICE_REQUEST_MAX_CONTENT_LENGTH: 10
...@@ -316,6 +321,7 @@ services: ...@@ -316,6 +321,7 @@ services:
- source: opensandbox-config - source: opensandbox-config
target: /etc/opensandbox/config.toml target: /etc/opensandbox/config.toml
environment: environment:
<<: [*x-no-proxy-config]
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck: healthcheck:
test: test:
...@@ -351,6 +357,7 @@ services: ...@@ -351,6 +357,7 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致 - /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载,需检查是否与主机的 socket 文件一致
environment: environment:
<<: [*x-no-proxy-config]
PORT: 3000 PORT: 3000
VM_RUNTIME: docker VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN
...@@ -448,7 +455,6 @@ configs: ...@@ -448,7 +455,6 @@ configs:
host = "0.0.0.0" host = "0.0.0.0"
port = 8090 port = 8090
log_level = "INFO" log_level = "INFO"
[runtime] [runtime]
type = "docker" type = "docker"
execd_image = "opensandbox/execd:v1.0.7" execd_image = "opensandbox/execd:v1.0.7"
...@@ -457,7 +463,7 @@ configs: ...@@ -457,7 +463,7 @@ configs:
image = "opensandbox/egress:v1.0.3" image = "opensandbox/egress:v1.0.3"
[docker] [docker]
network_mode = "fastgpt_opensandbox" network_mode = "bridge"
# When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP). # When server runs in a container, set host_ip to the host's IP or hostname so bridge-mode endpoints are reachable (e.g. host.docker.internal or the host LAN IP).
# It's required when server deployed with docker container under host. # It's required when server deployed with docker container under host.
host_ip = "host.docker.internal" host_ip = "host.docker.internal"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment