V4.14.10 dev (#6686)

* docker

* fix: community version check

* perf: deploy doc

* doc

* doc

* remove invalide md
This commit is contained in:
Archer
2026-03-31 23:15:29 +08:00
committed by GitHub
parent 8a2b321296
commit d5ea3179a0
43 changed files with 2740 additions and 584 deletions
+94 -4
View File
@@ -11,6 +11,8 @@ x-system-key: &x-system-key 'fastgpt-xxx'
x-plugin-auth-token: &x-plugin-auth-token 'token'
# code sandbox token
x-code-sandbox-token: &x-code-sandbox-token 'codesandbox'
# volume manager auth token
x-volume-manager-auth-token: &x-volume-manager-auth-token 'vmtoken'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
@@ -191,7 +193,7 @@ services:
fastgpt:
container_name: fastgpt
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.14.9.5 # git
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.14.10
ports:
- 3000:3000
networks:
@@ -234,6 +236,19 @@ services:
# AI Proxy 的 Admin Token,与 AI Proxy 中的环境变量 ADMIN_KEY
AIPROXY_API_TOKEN: *x-aiproxy-token
# ==================== Agent sandbox 配置 ====================
AGENT_SANDBOX_PROVIDER: opensandbox
# OpenSandbox 配置(PROVIDER: opensandbox 时生效)
AGENT_SANDBOX_OPENSANDBOX_BASEURL: http://opensandbox-server:8090
AGENT_SANDBOX_OPENSANDBOX_API_KEY:
AGENT_SANDBOX_OPENSANDBOX_RUNTIME: docker
AGENT_SANDBOX_OPENSANDBOX_IMAGE_REPO: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-sandbox
AGENT_SANDBOX_OPENSANDBOX_IMAGE_TAG: v0.0.2
# Volume 持久化配置(opensandbox provider 下可选)
AGENT_SANDBOX_ENABLE_VOLUME: true
AGENT_SANDBOX_VOLUME_MANAGER_URL: http://volume-manager:3000
AGENT_SANDBOX_VOLUME_MANAGER_TOKEN: *x-volume-manager-auth-token
# ==================== 日志与监控 ====================
# 传递给 OTLP 收集器的服务名称
LOG_OTEL_SERVICE_NAME: fastgpt-client
@@ -265,7 +280,7 @@ services:
- ./config.json:/app/data/config.json
code-sandbox:
container_name: code-sandbox
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.14.9.5
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-code-sandbox:v4.14.10
networks:
- fastgpt
restart: always
@@ -310,7 +325,7 @@ services:
retries: 3
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.14.9
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.14.10
networks:
- fastgpt
ports:
@@ -320,7 +335,7 @@ services:
<<: [*x-log-config]
FASTGPT_ENDPOINT: http://fastgpt:3000
fastgpt-plugin:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v0.5.5
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v0.5.6
container_name: fastgpt-plugin
restart: always
networks:
@@ -342,6 +357,60 @@ services:
interval: 30s
timeout: 20s
retries: 3
# 沙盒控制器:管理 Docker 容器的创建/执行/停止/删除
# runtime=docker 模式需要挂载 Docker socket
# 配置 docker.host_ip 为宿主机 LAN IP(容器内访问宿主机服务用)
opensandbox-server:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-server:v0.1.9
container_name: opensandbox-server
restart: always
networks:
- fastgpt
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载
configs:
- source: opensandbox-config
target: /etc/opensandbox/config.toml
environment:
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8090/health']
interval: 10s
timeout: 5s
retries: 5
# 卷管理微服务:负责幂等创建/删除 Docker named volume 或 k8s PVC
volume-manager:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-volume-manager:v0.0.2
container_name: volume-manager
restart: always
networks:
- fastgpt
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro # Docker 模式必须挂载(只读即可)
environment:
PORT: 3000
VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN
VM_VOLUME_NAME_PREFIX: fastgpt-session # volume 名称前缀
VM_LOG_LEVEL: info
healthcheck:
test:
[
'CMD',
'bun',
'-e',
"fetch('http://localhost:3000/health').then((res) => { if (!res.ok) throw new Error(String(res.status)); })"
]
interval: 10s
timeout: 5s
retries: 5
# Pre-pull only: not started by `docker compose up` (uses profile `prepull`).
agent-sandbox-image:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-sandbox:v0.0.2
profiles:
- prepull
# AI Proxy
aiproxy:
image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.3.5
@@ -394,3 +463,24 @@ networks:
aiproxy:
vector:
configs:
opensandbox-config:
content: |
[server]
host = "0.0.0.0"
port = 8090
log_level = "INFO"
[runtime]
type = "docker"
execd_image = "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/execd:v1.0.6"
[egress]
image = "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/egress:v1.0.1"
[docker]
network_mode = "bridge"
# 容器内访问宿主机服务时需要设置为宿主机 IP 或 hostname
# macOS/Windows: host.docker.internalLinux: 宿主机 LAN IP(如 192.168.1.100
host_ip = "host.docker.internal"
+94 -5
View File
@@ -11,6 +11,8 @@ x-system-key: &x-system-key 'fastgpt-xxx'
x-plugin-auth-token: &x-plugin-auth-token 'token'
# code sandbox token
x-code-sandbox-token: &x-code-sandbox-token 'codesandbox'
# volume manager auth token
x-volume-manager-auth-token: &x-volume-manager-auth-token 'vmtoken'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
@@ -168,7 +170,7 @@ services:
fastgpt:
container_name: fastgpt
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.14.9.5 # git
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.14.10
ports:
- 3000:3000
networks:
@@ -211,6 +213,19 @@ services:
# AI Proxy 的 Admin Token,与 AI Proxy 中的环境变量 ADMIN_KEY
AIPROXY_API_TOKEN: *x-aiproxy-token
# ==================== Agent sandbox 配置 ====================
AGENT_SANDBOX_PROVIDER: opensandbox
# OpenSandbox 配置(PROVIDER: opensandbox 时生效)
AGENT_SANDBOX_OPENSANDBOX_BASEURL: http://opensandbox-server:8090
AGENT_SANDBOX_OPENSANDBOX_API_KEY:
AGENT_SANDBOX_OPENSANDBOX_RUNTIME: docker
AGENT_SANDBOX_OPENSANDBOX_IMAGE_REPO: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-sandbox
AGENT_SANDBOX_OPENSANDBOX_IMAGE_TAG: v0.0.2
# Volume 持久化配置(opensandbox provider 下可选)
AGENT_SANDBOX_ENABLE_VOLUME: true
AGENT_SANDBOX_VOLUME_MANAGER_URL: http://volume-manager:3000
AGENT_SANDBOX_VOLUME_MANAGER_TOKEN: *x-volume-manager-auth-token
# ==================== 日志与监控 ====================
# 传递给 OTLP 收集器的服务名称
LOG_OTEL_SERVICE_NAME: fastgpt-client
@@ -242,7 +257,7 @@ services:
- ./config.json:/app/data/config.json
code-sandbox:
container_name: code-sandbox
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.14.9.5
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-code-sandbox:v4.14.10
networks:
- fastgpt
restart: always
@@ -287,7 +302,7 @@ services:
retries: 3
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.14.9
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.14.10
networks:
- fastgpt
ports:
@@ -297,7 +312,7 @@ services:
<<: [*x-log-config]
FASTGPT_ENDPOINT: http://fastgpt:3000
fastgpt-plugin:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v0.5.5
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v0.5.6
container_name: fastgpt-plugin
restart: always
networks:
@@ -319,6 +334,60 @@ services:
interval: 30s
timeout: 20s
retries: 3
# 沙盒控制器:管理 Docker 容器的创建/执行/停止/删除
# runtime=docker 模式需要挂载 Docker socket
# 配置 docker.host_ip 为宿主机 LAN IP(容器内访问宿主机服务用)
opensandbox-server:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-server:v0.1.9
container_name: opensandbox-server
restart: always
networks:
- fastgpt
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载
configs:
- source: opensandbox-config
target: /etc/opensandbox/config.toml
environment:
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8090/health']
interval: 10s
timeout: 5s
retries: 5
# 卷管理微服务:负责幂等创建/删除 Docker named volume 或 k8s PVC
volume-manager:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-volume-manager:v0.0.2
container_name: volume-manager
restart: always
networks:
- fastgpt
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro # Docker 模式必须挂载(只读即可)
environment:
PORT: 3000
VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN
VM_VOLUME_NAME_PREFIX: fastgpt-session # volume 名称前缀
VM_LOG_LEVEL: info
healthcheck:
test:
[
'CMD',
'bun',
'-e',
"fetch('http://localhost:3000/health').then((res) => { if (!res.ok) throw new Error(String(res.status)); })"
]
interval: 10s
timeout: 5s
retries: 5
# Pre-pull only: not started by `docker compose up` (uses profile `prepull`).
agent-sandbox-image:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-sandbox:v0.0.2
profiles:
- prepull
# AI Proxy
aiproxy:
image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.3.5
@@ -370,9 +439,29 @@ networks:
fastgpt:
aiproxy:
vector:
configs:
opensandbox-config:
content: |
[server]
host = "0.0.0.0"
port = 8090
log_level = "INFO"
[runtime]
type = "docker"
execd_image = "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/execd:v1.0.6"
[egress]
image = "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/egress:v1.0.1"
[docker]
network_mode = "bridge"
# 容器内访问宿主机服务时需要设置为宿主机 IP 或 hostname
# macOS/Windows: host.docker.internalLinux: 宿主机 LAN IP(如 192.168.1.100
host_ip = "host.docker.internal"
init_sql:
name: init_sql
content: |
ALTER SYSTEM SET ob_vector_memory_limit_percentage = 30;
+94 -4
View File
@@ -11,6 +11,8 @@ x-system-key: &x-system-key 'fastgpt-xxx'
x-plugin-auth-token: &x-plugin-auth-token 'token'
# code sandbox token
x-code-sandbox-token: &x-code-sandbox-token 'codesandbox'
# volume manager auth token
x-volume-manager-auth-token: &x-volume-manager-auth-token 'vmtoken'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
@@ -149,7 +151,7 @@ services:
fastgpt:
container_name: fastgpt
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.14.9.5 # git
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.14.10
ports:
- 3000:3000
networks:
@@ -192,6 +194,19 @@ services:
# AI Proxy 的 Admin Token,与 AI Proxy 中的环境变量 ADMIN_KEY
AIPROXY_API_TOKEN: *x-aiproxy-token
# ==================== Agent sandbox 配置 ====================
AGENT_SANDBOX_PROVIDER: opensandbox
# OpenSandbox 配置(PROVIDER: opensandbox 时生效)
AGENT_SANDBOX_OPENSANDBOX_BASEURL: http://opensandbox-server:8090
AGENT_SANDBOX_OPENSANDBOX_API_KEY:
AGENT_SANDBOX_OPENSANDBOX_RUNTIME: docker
AGENT_SANDBOX_OPENSANDBOX_IMAGE_REPO: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-sandbox
AGENT_SANDBOX_OPENSANDBOX_IMAGE_TAG: v0.0.2
# Volume 持久化配置(opensandbox provider 下可选)
AGENT_SANDBOX_ENABLE_VOLUME: true
AGENT_SANDBOX_VOLUME_MANAGER_URL: http://volume-manager:3000
AGENT_SANDBOX_VOLUME_MANAGER_TOKEN: *x-volume-manager-auth-token
# ==================== 日志与监控 ====================
# 传递给 OTLP 收集器的服务名称
LOG_OTEL_SERVICE_NAME: fastgpt-client
@@ -223,7 +238,7 @@ services:
- ./config.json:/app/data/config.json
code-sandbox:
container_name: code-sandbox
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.14.9.5
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-code-sandbox:v4.14.10
networks:
- fastgpt
restart: always
@@ -268,7 +283,7 @@ services:
retries: 3
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.14.9
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.14.10
networks:
- fastgpt
ports:
@@ -278,7 +293,7 @@ services:
<<: [*x-log-config]
FASTGPT_ENDPOINT: http://fastgpt:3000
fastgpt-plugin:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v0.5.5
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v0.5.6
container_name: fastgpt-plugin
restart: always
networks:
@@ -300,6 +315,60 @@ services:
interval: 30s
timeout: 20s
retries: 3
# 沙盒控制器:管理 Docker 容器的创建/执行/停止/删除
# runtime=docker 模式需要挂载 Docker socket
# 配置 docker.host_ip 为宿主机 LAN IP(容器内访问宿主机服务用)
opensandbox-server:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-server:v0.1.9
container_name: opensandbox-server
restart: always
networks:
- fastgpt
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载
configs:
- source: opensandbox-config
target: /etc/opensandbox/config.toml
environment:
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8090/health']
interval: 10s
timeout: 5s
retries: 5
# 卷管理微服务:负责幂等创建/删除 Docker named volume 或 k8s PVC
volume-manager:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-volume-manager:v0.0.2
container_name: volume-manager
restart: always
networks:
- fastgpt
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro # Docker 模式必须挂载(只读即可)
environment:
PORT: 3000
VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN
VM_VOLUME_NAME_PREFIX: fastgpt-session # volume 名称前缀
VM_LOG_LEVEL: info
healthcheck:
test:
[
'CMD',
'bun',
'-e',
"fetch('http://localhost:3000/health').then((res) => { if (!res.ok) throw new Error(String(res.status)); })"
]
interval: 10s
timeout: 5s
retries: 5
# Pre-pull only: not started by `docker compose up` (uses profile `prepull`).
agent-sandbox-image:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-sandbox:v0.0.2
profiles:
- prepull
# AI Proxy
aiproxy:
image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.3.5
@@ -352,3 +421,24 @@ networks:
aiproxy:
vector:
configs:
opensandbox-config:
content: |
[server]
host = "0.0.0.0"
port = 8090
log_level = "INFO"
[runtime]
type = "docker"
execd_image = "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/execd:v1.0.6"
[egress]
image = "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/egress:v1.0.1"
[docker]
network_mode = "bridge"
# 容器内访问宿主机服务时需要设置为宿主机 IP 或 hostname
# macOS/Windows: host.docker.internalLinux: 宿主机 LAN IP(如 192.168.1.100
host_ip = "host.docker.internal"
+94 -4
View File
@@ -11,6 +11,8 @@ x-system-key: &x-system-key 'fastgpt-xxx'
x-plugin-auth-token: &x-plugin-auth-token 'token'
# code sandbox token
x-code-sandbox-token: &x-code-sandbox-token 'codesandbox'
# volume manager auth token
x-volume-manager-auth-token: &x-volume-manager-auth-token 'vmtoken'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
@@ -155,7 +157,7 @@ services:
fastgpt:
container_name: fastgpt
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.14.9.5 # git
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.14.10
ports:
- 3000:3000
networks:
@@ -198,6 +200,19 @@ services:
# AI Proxy 的 Admin Token,与 AI Proxy 中的环境变量 ADMIN_KEY
AIPROXY_API_TOKEN: *x-aiproxy-token
# ==================== Agent sandbox 配置 ====================
AGENT_SANDBOX_PROVIDER: opensandbox
# OpenSandbox 配置(PROVIDER: opensandbox 时生效)
AGENT_SANDBOX_OPENSANDBOX_BASEURL: http://opensandbox-server:8090
AGENT_SANDBOX_OPENSANDBOX_API_KEY:
AGENT_SANDBOX_OPENSANDBOX_RUNTIME: docker
AGENT_SANDBOX_OPENSANDBOX_IMAGE_REPO: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-sandbox
AGENT_SANDBOX_OPENSANDBOX_IMAGE_TAG: v0.0.2
# Volume 持久化配置(opensandbox provider 下可选)
AGENT_SANDBOX_ENABLE_VOLUME: true
AGENT_SANDBOX_VOLUME_MANAGER_URL: http://volume-manager:3000
AGENT_SANDBOX_VOLUME_MANAGER_TOKEN: *x-volume-manager-auth-token
# ==================== 日志与监控 ====================
# 传递给 OTLP 收集器的服务名称
LOG_OTEL_SERVICE_NAME: fastgpt-client
@@ -229,7 +244,7 @@ services:
- ./config.json:/app/data/config.json
code-sandbox:
container_name: code-sandbox
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.14.9.5
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-code-sandbox:v4.14.10
networks:
- fastgpt
restart: always
@@ -274,7 +289,7 @@ services:
retries: 3
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.14.9
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.14.10
networks:
- fastgpt
ports:
@@ -284,7 +299,7 @@ services:
<<: [*x-log-config]
FASTGPT_ENDPOINT: http://fastgpt:3000
fastgpt-plugin:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v0.5.5
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v0.5.6
container_name: fastgpt-plugin
restart: always
networks:
@@ -306,6 +321,60 @@ services:
interval: 30s
timeout: 20s
retries: 3
# 沙盒控制器:管理 Docker 容器的创建/执行/停止/删除
# runtime=docker 模式需要挂载 Docker socket
# 配置 docker.host_ip 为宿主机 LAN IP(容器内访问宿主机服务用)
opensandbox-server:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-server:v0.1.9
container_name: opensandbox-server
restart: always
networks:
- fastgpt
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载
configs:
- source: opensandbox-config
target: /etc/opensandbox/config.toml
environment:
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8090/health']
interval: 10s
timeout: 5s
retries: 5
# 卷管理微服务:负责幂等创建/删除 Docker named volume 或 k8s PVC
volume-manager:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-volume-manager:v0.0.2
container_name: volume-manager
restart: always
networks:
- fastgpt
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro # Docker 模式必须挂载(只读即可)
environment:
PORT: 3000
VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN
VM_VOLUME_NAME_PREFIX: fastgpt-session # volume 名称前缀
VM_LOG_LEVEL: info
healthcheck:
test:
[
'CMD',
'bun',
'-e',
"fetch('http://localhost:3000/health').then((res) => { if (!res.ok) throw new Error(String(res.status)); })"
]
interval: 10s
timeout: 5s
retries: 5
# Pre-pull only: not started by `docker compose up` (uses profile `prepull`).
agent-sandbox-image:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-sandbox:v0.0.2
profiles:
- prepull
# AI Proxy
aiproxy:
image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.3.5
@@ -358,3 +427,24 @@ networks:
aiproxy:
vector:
configs:
opensandbox-config:
content: |
[server]
host = "0.0.0.0"
port = 8090
log_level = "INFO"
[runtime]
type = "docker"
execd_image = "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/execd:v1.0.6"
[egress]
image = "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/egress:v1.0.1"
[docker]
network_mode = "bridge"
# 容器内访问宿主机服务时需要设置为宿主机 IP 或 hostname
# macOS/Windows: host.docker.internalLinux: 宿主机 LAN IP(如 192.168.1.100
host_ip = "host.docker.internal"
+94 -4
View File
@@ -11,6 +11,8 @@ x-system-key: &x-system-key 'fastgpt-xxx'
x-plugin-auth-token: &x-plugin-auth-token 'token'
# code sandbox token
x-code-sandbox-token: &x-code-sandbox-token 'codesandbox'
# volume manager auth token
x-volume-manager-auth-token: &x-volume-manager-auth-token 'vmtoken'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
@@ -133,7 +135,7 @@ services:
fastgpt:
container_name: fastgpt
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.14.9.5 # git
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.14.10
ports:
- 3000:3000
networks:
@@ -176,6 +178,19 @@ services:
# AI Proxy 的 Admin Token,与 AI Proxy 中的环境变量 ADMIN_KEY
AIPROXY_API_TOKEN: *x-aiproxy-token
# ==================== Agent sandbox 配置 ====================
AGENT_SANDBOX_PROVIDER: opensandbox
# OpenSandbox 配置(PROVIDER: opensandbox 时生效)
AGENT_SANDBOX_OPENSANDBOX_BASEURL: http://opensandbox-server:8090
AGENT_SANDBOX_OPENSANDBOX_API_KEY:
AGENT_SANDBOX_OPENSANDBOX_RUNTIME: docker
AGENT_SANDBOX_OPENSANDBOX_IMAGE_REPO: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-sandbox
AGENT_SANDBOX_OPENSANDBOX_IMAGE_TAG: v0.0.2
# Volume 持久化配置(opensandbox provider 下可选)
AGENT_SANDBOX_ENABLE_VOLUME: true
AGENT_SANDBOX_VOLUME_MANAGER_URL: http://volume-manager:3000
AGENT_SANDBOX_VOLUME_MANAGER_TOKEN: *x-volume-manager-auth-token
# ==================== 日志与监控 ====================
# 传递给 OTLP 收集器的服务名称
LOG_OTEL_SERVICE_NAME: fastgpt-client
@@ -207,7 +222,7 @@ services:
- ./config.json:/app/data/config.json
code-sandbox:
container_name: code-sandbox
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.14.9.5
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-code-sandbox:v4.14.10
networks:
- fastgpt
restart: always
@@ -252,7 +267,7 @@ services:
retries: 3
fastgpt-mcp-server:
container_name: fastgpt-mcp-server
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.14.9
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.14.10
networks:
- fastgpt
ports:
@@ -262,7 +277,7 @@ services:
<<: [*x-log-config]
FASTGPT_ENDPOINT: http://fastgpt:3000
fastgpt-plugin:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v0.5.5
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v0.5.6
container_name: fastgpt-plugin
restart: always
networks:
@@ -284,6 +299,60 @@ services:
interval: 30s
timeout: 20s
retries: 3
# 沙盒控制器:管理 Docker 容器的创建/执行/停止/删除
# runtime=docker 模式需要挂载 Docker socket
# 配置 docker.host_ip 为宿主机 LAN IP(容器内访问宿主机服务用)
opensandbox-server:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/opensandbox-server:v0.1.9
container_name: opensandbox-server
restart: always
networks:
- fastgpt
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Docker 模式必须挂载
configs:
- source: opensandbox-config
target: /etc/opensandbox/config.toml
environment:
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8090/health']
interval: 10s
timeout: 5s
retries: 5
# 卷管理微服务:负责幂等创建/删除 Docker named volume 或 k8s PVC
volume-manager:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-volume-manager:v0.0.2
container_name: volume-manager
restart: always
networks:
- fastgpt
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro # Docker 模式必须挂载(只读即可)
environment:
PORT: 3000
VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token # 对应 AGENT_SANDBOX_VOLUME_MANAGER_TOKEN
VM_VOLUME_NAME_PREFIX: fastgpt-session # volume 名称前缀
VM_LOG_LEVEL: info
healthcheck:
test:
[
'CMD',
'bun',
'-e',
"fetch('http://localhost:3000/health').then((res) => { if (!res.ok) throw new Error(String(res.status)); })"
]
interval: 10s
timeout: 5s
retries: 5
# Pre-pull only: not started by `docker compose up` (uses profile `prepull`).
agent-sandbox-image:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-sandbox:v0.0.2
profiles:
- prepull
# AI Proxy
aiproxy:
image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.3.5
@@ -336,3 +405,24 @@ networks:
aiproxy:
vector:
configs:
opensandbox-config:
content: |
[server]
host = "0.0.0.0"
port = 8090
log_level = "INFO"
[runtime]
type = "docker"
execd_image = "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/execd:v1.0.6"
[egress]
image = "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/egress:v1.0.1"
[docker]
network_mode = "bridge"
# 容器内访问宿主机服务时需要设置为宿主机 IP 或 hostname
# macOS/Windows: host.docker.internalLinux: 宿主机 LAN IP(如 192.168.1.100
host_ip = "host.docker.internal"