Commit 549230b0 by Archer Committed by GitHub

Doc (#7471)

* doc

* doc

* doc
parent ff0a76a1
......@@ -182,7 +182,7 @@ services:
retries: 3
fastgpt-code-sandbox:
container_name: fastgpt-code-sandbox
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-code-sandbox:v4.15.4
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-code-sandbox:v4.15.6
ports:
- 3002:3000
networks:
......@@ -248,7 +248,7 @@ services:
<<: [*x-no-proxy-config]
FASTGPT_ENDPOINT: http://fastgpt:3000
fastgpt-plugin:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v1.0.2
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin:v1.1.0-beta1
container_name: fastgpt-plugin
restart: always
network_mode: host
......@@ -310,7 +310,7 @@ services:
# 浏览器与 OpenSandbox 之间的 WebSocket 鉴权代理
fastgpt-agent-sandbox-proxy:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-sandbox-proxy:v0.2.0
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-sandbox-proxy:v0.3.0-beta4
container_name: fastgpt-agent-sandbox-proxy
restart: always
ports:
......@@ -332,7 +332,7 @@ services:
# Pre-pull only: not started by `docker compose up` (uses profile `prepull`).
opensandbox-agent-sandbox-image:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-sandbox:v0.2.0
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-sandbox:v0.3.0-beta4
profiles:
- prepull
opensandbox-execd-image:
......@@ -345,7 +345,7 @@ services:
- prepull
# 卷管理微服务:负责幂等创建/删除 Docker named volume 或 k8s PVC
fastgpt-volume-manager:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-volume-manager:v0.2.0
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-volume-manager:v0.3.0-beta4
container_name: fastgpt-volume-manager
restart: always
ports:
......
......@@ -182,7 +182,7 @@ services:
retries: 3
fastgpt-code-sandbox:
container_name: fastgpt-code-sandbox
image: ghcr.io/labring/fastgpt-code-sandbox:v4.15.4
image: ghcr.io/labring/fastgpt-code-sandbox:v4.15.6
ports:
- 3002:3000
networks:
......@@ -248,7 +248,7 @@ services:
<<: [*x-no-proxy-config]
FASTGPT_ENDPOINT: http://fastgpt:3000
fastgpt-plugin:
image: ghcr.io/labring/fastgpt-plugin:v1.0.2
image: ghcr.io/labring/fastgpt-plugin:v1.1.0-beta1
container_name: fastgpt-plugin
restart: always
network_mode: host
......@@ -310,7 +310,7 @@ services:
# 浏览器与 OpenSandbox 之间的 WebSocket 鉴权代理
fastgpt-agent-sandbox-proxy:
image: ghcr.io/labring/fastgpt-agent-sandbox-proxy:v0.2.0
image: ghcr.io/labring/fastgpt-agent-sandbox-proxy:v0.3.0-beta4
container_name: fastgpt-agent-sandbox-proxy
restart: always
ports:
......@@ -332,7 +332,7 @@ services:
# Pre-pull only: not started by `docker compose up` (uses profile `prepull`).
opensandbox-agent-sandbox-image:
image: ghcr.io/labring/fastgpt-agent-sandbox:v0.2.0
image: ghcr.io/labring/fastgpt-agent-sandbox:v0.3.0-beta4
profiles:
- prepull
opensandbox-execd-image:
......@@ -345,7 +345,7 @@ services:
- prepull
# 卷管理微服务:负责幂等创建/删除 Docker named volume 或 k8s PVC
fastgpt-volume-manager:
image: ghcr.io/labring/fastgpt-agent-volume-manager:v0.2.0
image: ghcr.io/labring/fastgpt-agent-volume-manager:v0.3.0-beta4
container_name: fastgpt-volume-manager
restart: always
ports:
......
......@@ -137,6 +137,7 @@ const loadVectorConfigs = async () => {
extra: await readOptionalFile(config.extraFile),
depends: config.dbFile ? ' fastgpt-vector:\n condition: service_healthy' : ''
};
vectors[name].extraEntries = vectors[name].extra ? ` ${vectors[name].extra}` : '';
vectors[name].extraBlock = vectors[name].extra ? `configs:\n ${vectors[name].extra}` : '';
}
......@@ -186,7 +187,7 @@ const loadArgs = (version) => {
* @param {RegionEnum} region
* @param {string | undefined} vec
* @param {Record<ServiceKey, ArgItemType>} args
* @param {Record<string, { filename: string, db: string, config: string, extra: string, extraBlock: string, depends: string }>} vectors
* @param {Record<string, { filename: string, db: string, config: string, extra: string, extraEntries: string, extraBlock: string, depends: string }>} vectors
* @param {string} context
* @returns {string}
*/
......@@ -230,7 +231,9 @@ const replace = (source, region, vec, args, vectors, context) => {
} else if (b === 'image') {
const image = arg.image?.[region];
if (!image) {
throw new Error(`Missing deploy image "${a}.${region}" for ${formatExpr(expr)} in ${context}`);
throw new Error(
`Missing deploy image "${a}.${region}" for ${formatExpr(expr)} in ${context}`
);
}
return image;
}
......@@ -261,11 +264,15 @@ const generateDevFile = async (deployVersions, vectors) => {
await Promise.all([
fs.promises.writeFile(
path.join(process.cwd(), 'dev', 'docker-compose.cn.yml'),
formatYamlOutput(replace(template, 'cn', undefined, args, vectors, 'dev/docker-compose.cn.yml'))
formatYamlOutput(
replace(template, 'cn', undefined, args, vectors, 'dev/docker-compose.cn.yml')
)
),
fs.promises.writeFile(
path.join(process.cwd(), 'dev', 'docker-compose.yml'),
formatYamlOutput(replace(template, 'global', undefined, args, vectors, 'dev/docker-compose.yml'))
formatYamlOutput(
replace(template, 'global', undefined, args, vectors, 'dev/docker-compose.yml')
)
)
]);
......
{
"tags": {
"fastgpt": "v4.15.4",
"fastgpt-plugin": "v1.0.2",
"fastgpt-code-sandbox": "v4.15.4",
"fastgpt": "v4.16.0-beta1",
"fastgpt-plugin": "v1.1.0-beta1",
"fastgpt-code-sandbox": "v4.15.6",
"fastgpt-mcp_server": "v4.14.23",
"volume-manager": "v0.2.0",
"agent-sandbox-image": "v0.2.0",
"agent-sandbox-proxy": "v0.2.0",
"volume-manager": "v0.3.0-beta4",
"agent-sandbox-image": "v0.3.0-beta4",
"agent-sandbox-proxy": "v0.3.0-beta4",
"opensandbox-server": "v0.2.1",
"opensandbox-execd": "v1.0.21",
"opensandbox-egress": "v1.1.4",
......
......@@ -5,12 +5,22 @@
# root 默认密码(重启后会强制重置该密码成环境变量值)
x-default-root-psw: &x-default-root-psw '1234'
# FastGPT 前端访问地址,必须填写用户实际访问 FastGPT 的地址
x-fe-domain: &x-fe-domain ''
# Sandbox Proxy WebSocket 地址,必须填写用户实际访问地址
x-agent-sandbox-proxy-url: &x-agent-sandbox-proxy-url ''
# Sandbox Proxy HTTP 预览地址,必须填写用户实际访问地址
x-agent-sandbox-preview-proxy-url: &x-agent-sandbox-preview-proxy-url ''
# 系统最高密钥凭证
x-system-key: &x-system-key 'fastgpt-xxx'
# plugin auth token
x-plugin-auth-token: &x-plugin-auth-token 'token'
x-plugin-auth-token: &x-plugin-auth-token 'fastgpt_plugin_auth_token_32char'
# code sandbox token
x-code-sandbox-token: &x-code-sandbox-token 'codesandbox'
# agent sandbox proxy secret,必须与 FastGPT 主站环境变量保持一致,且至少 32 位
x-agent-sandbox-proxy-secret: &x-agent-sandbox-proxy-secret 'default_fastgpt_agent_sandbox_proxy_secret'
# volume manager token,必须与 FastGPT 主站环境变量保持一致
x-volume-manager-auth-token: &x-volume-manager-auth-token 'vmtoken'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
......@@ -39,8 +49,44 @@ x-log-config: &x-log-config
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
x-no-proxy-config: &x-no-proxy-config
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
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
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-agent-sandbox-proxy,fastgpt-opensandbox-server,fastgpt-volume-manager,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-agent-sandbox-proxy,fastgpt-opensandbox-server,fastgpt-volume-manager,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
# FastGPT 主服务的 Agent Sandbox 配置
x-agent-sandbox-config: &x-agent-sandbox-config
AGENT_SANDBOX_PROVIDER: opensandbox
AGENT_SANDBOX_PROXY_SECRET: *x-agent-sandbox-proxy-secret
# 浏览器访问 agent-sandbox-proxy 的 WebSocket 地址。
AGENT_SANDBOX_PROXY_URL: *x-agent-sandbox-proxy-url
# 浏览器访问 Sandbox 文件预览的 HTTP(S) 地址。
AGENT_SANDBOX_PREVIEW_PROXY_URL: *x-agent-sandbox-preview-proxy-url
# 沙盒规模大小
AGENT_SANDBOX_CPU_COUNT: 1
AGENT_SANDBOX_MEMORY_MIB: 2048
AGENT_SANDBOX_STORAGE_SIZE_GI: 1
# 不活跃判断阈值
AGENT_SANDBOX_SUSPEND_MINUTES: 60
# 长期不活跃判断阈值
AGENT_SANDBOX_ARCHIVE_INACTIVE_DAYS: 7
AGENT_SANDBOX_WS_MAX_MESSAGE_BYTES: 67108864
AGENT_SANDBOX_WS_MAX_FRAME_BYTES: 16777216
# 自定义 npm/pip 源
AGENT_SANDBOX_NPM_REGISTRY:
AGENT_SANDBOX_PYPI_INDEX_URL:
# Opensandox 配置
AGENT_SANDBOX_OPENSANDBOX_BASEURL: http://fastgpt-opensandbox-server:8090
AGENT_SANDBOX_OPENSANDBOX_API_KEY: fastgpt-opensandbox-api-key
AGENT_SANDBOX_OPENSANDBOX_RUNTIME: docker
AGENT_SANDBOX_OPENSANDBOX_IMAGE: ${{agent-sandbox-image.image}}:${{agent-sandbox-image.tag}}
AGENT_SANDBOX_OPENSANDBOX_USE_SERVER_PROXY: true
AGENT_SANDBOX_OPENSANDBOX_VOLUME_MANAGER_URL: http://fastgpt-volume-manager:3000
AGENT_SANDBOX_OPENSANDBOX_VOLUME_MANAGER_TOKEN: *x-volume-manager-auth-token
AGENT_SANDBOX_OPENSANDBOX_VOLUME_NAME_PREFIX: fastgpt-session
# Sealos devbox 配置
AGENT_SANDBOX_SEALOS_BASEURL:
AGENT_SANDBOX_SEALOS_TOKEN:
AGENT_SANDBOX_SEALOS_WORK_DIRECTORY: /home/devbox/workspace
AGENT_SANDBOX_SEALOS_IMAGE:
# 向量库相关配置
x-vec-config: &x-vec-config
......@@ -158,11 +204,11 @@ services:
restart: always
environment:
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
<<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
<<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config, *x-agent-sandbox-config]
HOSTNAME: 0.0.0.0
# ==================== 基础配置 ====================
# 必填。客户端访问 FastGPT 时使用的地址,由协议、主机和可选端口组成,用于补全文件资源路径。例如 https://fastgpt.cn;本地开发可使用 http://localhost:3000。
FE_DOMAIN:
FE_DOMAIN: *x-fe-domain
# root key(最高权限)
ROOT_KEY: *x-system-key
# root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。
......@@ -193,11 +239,9 @@ services:
AIPROXY_API_ENDPOINT: http://fastgpt-aiproxy:3000
# AI Proxy 的 Admin Token,与 AI Proxy 中的环境变量 ADMIN_KEY
AIPROXY_API_TOKEN: *x-aiproxy-token
PASSWORD_LOGIN_MINUTE_LIMIT_COUNT:
# MCP Server 代理地址,用于 MCP 使用方式页拼接 SSE 地址
SSE_MCP_SERVER_PROXY_ENDPOINT:
# 官网访客归因 CRM;地址需包含 /api/v1,为空时不进行身份上报
CRM_API_URL:
CRM_API_KEY:
# ==================== 日志与监控 ====================
# 传递给 OTLP 收集器的服务名称
......@@ -320,6 +364,90 @@ services:
timeout: 20s
retries: 3
# OpenSandbox Server 和 Volume Manager 仅需在 app 内网中访问。
fastgpt-opensandbox-server:
image: ${{opensandbox-server.image}}:${{opensandbox-server.tag}}
container_name: fastgpt-opensandbox-server
restart: always
networks:
- app
volumes:
- /var/run/docker.sock:/var/run/docker.sock
configs:
- source: opensandbox-config
target: /etc/opensandbox/config.toml
environment:
<<: [*x-no-proxy-config]
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck:
test:
[
'CMD',
'python',
'-c',
"import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://localhost:8090/health',timeout=3).status==200 else 1)"
]
interval: 10s
timeout: 5s
retries: 5
fastgpt-volume-manager:
image: ${{volume-manager.image}}:${{volume-manager.tag}}
container_name: fastgpt-volume-manager
restart: always
networks:
- app
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
<<: [*x-no-proxy-config]
PORT: 3000
VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token
VM_LOG_LEVEL: info
healthcheck:
test:
[
'CMD',
'node',
'-e',
"fetch('http://localhost:3000/health').then((res) => { if (!res.ok) process.exit(1); }).catch(() => process.exit(1));"
]
interval: 10s
timeout: 5s
retries: 5
# 仅用于预拉取运行时镜像,不会随 docker compose up 启动。
opensandbox-agent-sandbox-image:
image: ${{agent-sandbox-image.image}}:${{agent-sandbox-image.tag}}
profiles:
- prepull
opensandbox-execd-image:
image: ${{opensandbox-execd.image}}:${{opensandbox-execd.tag}}
profiles:
- prepull
opensandbox-egress-image:
image: ${{opensandbox-egress.image}}:${{opensandbox-egress.tag}}
profiles:
- prepull
# 浏览器访问 Agent Sandbox 的鉴权代理,生产环境应通过独立域名反向代理 3006 端口。
fastgpt-agent-sandbox-proxy:
image: ${{agent-sandbox-proxy.image}}:${{agent-sandbox-proxy.tag}}
container_name: fastgpt-agent-sandbox-proxy
restart: always
networks:
- app
ports:
- 3006:1006
environment:
<<: [*x-no-proxy-config]
PORT: 1006
AGENT_SANDBOX_PROXY_SECRET: *x-agent-sandbox-proxy-secret
FASTGPT_APP_URL: http://fastgpt-app:3000
FASTGPT_APP_REQUEST_TIMEOUT_SECS: 60
RUST_LOG: info,fastgpt_agent_sandbox_proxy=debug
# AI Proxy
fastgpt-aiproxy:
image: ${{aiproxy.image}}:${{aiproxy.tag}}
......@@ -392,4 +520,26 @@ volumes:
fastgpt-seekdb-config:
fastgpt-aiproxy_pg:
# ${{vec.extraBlock}}
configs:
opensandbox-config:
content: |
[server]
host = "0.0.0.0"
port = 8090
api_key = "fastgpt-opensandbox-api-key"
log_level = "INFO"
[runtime]
type = "docker"
execd_image = "${{opensandbox-execd.image}}:${{opensandbox-execd.tag}}"
[egress]
image = "${{opensandbox-egress.image}}:${{opensandbox-egress.tag}}"
[docker]
network_mode = "bridge"
host_ip = "host.docker.internal"
[ingress]
mode = "direct"
# ${{vec.extraEntries}}
{
"tags": {
"fastgpt": "v4.15.4",
"fastgpt-plugin": "v1.0.2",
"fastgpt": "v4.15.7",
"fastgpt-plugin": "v1.0.3",
"fastgpt-code-sandbox": "v4.15.4",
"fastgpt-code-sandbox": "v4.15.7",
"fastgpt-mcp_server": "v4.14.23",
"volume-manager": "v0.2.0",
"agent-sandbox-image": "v0.2.0",
"agent-sandbox-proxy": "v0.2.0",
"opensandbox-server": "v0.2.0",
"opensandbox-execd": "v1.0.21",
"opensandbox-egress": "v1.1.4",
"aiproxy": "v0.6.5",
"aiproxy-pg": "0.8.0-pg15",
......@@ -25,6 +32,12 @@
"fastgpt-plugin": "registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin",
"fastgpt-code-sandbox": "registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-code-sandbox",
"fastgpt-mcp_server": "registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server",
"volume-manager": "registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-volume-manager",
"agent-sandbox-image": "registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-sandbox",
"agent-sandbox-proxy": "registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-sandbox-proxy",
"opensandbox-server": "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/server",
"opensandbox-execd": "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/execd",
"opensandbox-egress": "sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/egress",
"aiproxy": "registry.cn-hangzhou.aliyuncs.com/labring/aiproxy",
"aiproxy-pg": "registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector",
"mongo": "registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo",
......@@ -42,6 +55,12 @@
"fastgpt-plugin": "ghcr.io/labring/fastgpt-plugin",
"fastgpt-code-sandbox": "ghcr.io/labring/fastgpt-code-sandbox",
"fastgpt-mcp_server": "ghcr.io/labring/fastgpt-mcp_server",
"volume-manager": "ghcr.io/labring/fastgpt-agent-volume-manager",
"agent-sandbox-image": "ghcr.io/labring/fastgpt-agent-sandbox",
"agent-sandbox-proxy": "ghcr.io/labring/fastgpt-agent-sandbox-proxy",
"opensandbox-server": "opensandbox/server",
"opensandbox-execd": "opensandbox/execd",
"opensandbox-egress": "opensandbox/egress",
"aiproxy": "ghcr.io/labring/aiproxy",
"aiproxy-pg": "pgvector/pgvector",
"mongo": "mongo",
......
# 用于部署的 docker-compose 文件:
# - FastGPT 端口映射为 3000:3000
# - FastGPT-mcp-server 端口映射 3003:3000
# - 如需启用 Agent/Skill 沙盒,请单独部署 fastgpt-agent-sandbox-proxy
# - Agent Sandbox Proxy 端口映射为 3006:1006
# - 建议修改账密后再运行
# root 默认密码(重启后会强制重置该密码成环境变量值)
x-default-root-psw: &x-default-root-psw '1234'
# FastGPT 前端访问地址,必须填写用户实际访问 FastGPT 的地址
x-fe-domain: &x-fe-domain ''
# Sandbox Proxy WebSocket 地址,必须填写用户实际访问地址
x-agent-sandbox-proxy-url: &x-agent-sandbox-proxy-url ''
# 系统最高密钥凭证
x-system-key: &x-system-key 'fastgpt-xxx'
# 文件阅读 token 密钥
......@@ -20,6 +24,8 @@ x-plugin-auth-token: &x-plugin-auth-token 'fastgpt-plugin-token-please-change'
x-code-sandbox-token: &x-code-sandbox-token 'codesandbox'
# agent sandbox proxy secret,必须与 FastGPT 主站环境变量保持一致,且至少 32 位
x-agent-sandbox-proxy-secret: &x-agent-sandbox-proxy-secret 'default_fastgpt_agent_sandbox_proxy_secret'
# volume manager token,必须与 FastGPT 主站环境变量保持一致
x-volume-manager-auth-token: &x-volume-manager-auth-token 'vmtoken'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
......@@ -55,8 +61,8 @@ x-log-config: &x-log-config
# 容器运行环境可能会自动注入 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-agent-sandbox-proxy,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-agent-sandbox-proxy,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-agent-sandbox-proxy,fastgpt-opensandbox-server,fastgpt-volume-manager,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-agent-sandbox-proxy,fastgpt-opensandbox-server,fastgpt-volume-manager,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
# FastGPT 主服务的服务地址配置
x-fastgpt-service-config: &x-fastgpt-service-config
......@@ -69,29 +75,25 @@ x-fastgpt-service-config: &x-fastgpt-service-config
# FastGPT 主服务的 Agent Sandbox 配置
x-agent-sandbox-config: &x-agent-sandbox-config
# v4.15.0 默认不绑定具体 Agent Sandbox provider。
# 如需启用 Agent/Skill 沙盒,请参考升级文档选择 sealosdevbox 或 opensandbox 后补充对应环境变量。
AGENT_SANDBOX_PROVIDER:
# 默认启用 OpenSandbox;如使用其他 provider,请按沙盒配置文档替换相关变量。
AGENT_SANDBOX_PROVIDER: opensandbox
AGENT_SANDBOX_PROXY_SECRET: *x-agent-sandbox-proxy-secret
# 浏览器访问 agent-sandbox-proxy 的地址。启用 Agent/Skill 沙盒时,必须改成单独部署的 proxy 的 ws:// 或 wss:// 地址。
AGENT_SANDBOX_PROXY_URL:
AGENT_SANDBOX_OPENSANDBOX_BASEURL:
AGENT_SANDBOX_OPENSANDBOX_API_KEY:
AGENT_SANDBOX_PROXY_URL: *x-agent-sandbox-proxy-url
AGENT_SANDBOX_OPENSANDBOX_BASEURL: http://fastgpt-opensandbox-server:8090
AGENT_SANDBOX_OPENSANDBOX_API_KEY: fastgpt-opensandbox-api-key
AGENT_SANDBOX_OPENSANDBOX_RUNTIME: docker
AGENT_SANDBOX_OPENSANDBOX_IMAGE_REPO:
AGENT_SANDBOX_OPENSANDBOX_IMAGE_TAG:
AGENT_SANDBOX_OPENSANDBOX_IMAGE_REPO: ${{agent-sandbox-image.image}}
AGENT_SANDBOX_OPENSANDBOX_IMAGE_TAG: ${{agent-sandbox-image.tag}}
AGENT_SANDBOX_OPENSANDBOX_USE_SERVER_PROXY: true
AGENT_SANDBOX_SEALOS_BASEURL:
AGENT_SANDBOX_SEALOS_TOKEN:
AGENT_SANDBOX_SEALOS_WORK_DIRECTORY: /home/devbox/workspace
AGENT_SANDBOX_SEALOS_IMAGE:
AGENT_SANDBOX_ENABLE_VOLUME: false
AGENT_SANDBOX_VOLUME_MANAGER_URL:
AGENT_SANDBOX_VOLUME_MANAGER_TOKEN:
AGENT_SANDBOX_OPENSANDBOX_VOLUME_MANAGER_URL: http://fastgpt-volume-manager:3000
AGENT_SANDBOX_OPENSANDBOX_VOLUME_MANAGER_TOKEN: *x-volume-manager-auth-token
AGENT_SANDBOX_DISK_MB: 1024
AGENT_SANDBOX_MAX_EDIT_DEBUG: 100
AGENT_SANDBOX_ENTRYPOINT_TIMEOUT_SECONDS: 30
AGENT_SANDBOX_WS_MAX_MESSAGE_BYTES: 67108864
AGENT_SANDBOX_WS_MAX_FRAME_BYTES: 16777216
AGENT_SANDBOX_NPM_REGISTRY:
AGENT_SANDBOX_PYPI_INDEX_URL:
# FastGPT App 专用环境变量(projects/app/src/env.ts · appEnv)
x-app-env-config: &x-app-env-config
......@@ -129,7 +131,7 @@ x-service-env-config: &x-service-env-config
PASSWORD_LOGIN_LOCK_SECONDS:
MAX_LOGIN_SESSION:
ALLOWED_ORIGINS:
AGENT_ENGINE: default
AGENT_ENGINE: fastAgent
SKIP_FILE_TYPE_CHECK: false
WECHAT_CHANNEL_CONCURRENCY: 1000
PARSE_FILE_WORKERS: 5
......@@ -305,7 +307,7 @@ services:
*x-app-env-config
]
# 必填。客户端访问 FastGPT 时使用的地址,由协议、主机和可选端口组成,用于补全文件资源路径。例如 https://fastgpt.cn;本地开发可使用 http://localhost:3000。
FE_DOMAIN:
FE_DOMAIN: *x-fe-domain
# 文件域名(也指向 FastGPT 服务);如需更高安全性可独立分配域名,避免高危文件读取到主域名内容
FILE_DOMAIN:
fastgpt-code-sandbox:
......@@ -407,6 +409,90 @@ services:
timeout: 20s
retries: 3
# OpenSandbox Server 和 Volume Manager 仅需在 app 内网中访问。
fastgpt-opensandbox-server:
image: ${{opensandbox-server.image}}:${{opensandbox-server.tag}}
container_name: fastgpt-opensandbox-server
restart: always
networks:
- app
volumes:
- /var/run/docker.sock:/var/run/docker.sock
configs:
- source: opensandbox-config
target: /etc/opensandbox/config.toml
environment:
<<: [*x-no-proxy-config]
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck:
test:
[
'CMD',
'python',
'-c',
"import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://localhost:8090/health',timeout=3).status==200 else 1)"
]
interval: 10s
timeout: 5s
retries: 5
fastgpt-volume-manager:
image: ${{volume-manager.image}}:${{volume-manager.tag}}
container_name: fastgpt-volume-manager
restart: always
networks:
- app
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
<<: [*x-no-proxy-config]
PORT: 3000
VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token
VM_LOG_LEVEL: info
healthcheck:
test:
[
'CMD',
'node',
'-e',
"fetch('http://localhost:3000/health').then((res) => { if (!res.ok) process.exit(1); }).catch(() => process.exit(1));"
]
interval: 10s
timeout: 5s
retries: 5
# 仅用于预拉取运行时镜像,不会随 docker compose up 启动。
opensandbox-agent-sandbox-image:
image: ${{agent-sandbox-image.image}}:${{agent-sandbox-image.tag}}
profiles:
- prepull
opensandbox-execd-image:
image: ${{opensandbox-execd.image}}:${{opensandbox-execd.tag}}
profiles:
- prepull
opensandbox-egress-image:
image: ${{opensandbox-egress.image}}:${{opensandbox-egress.tag}}
profiles:
- prepull
# 浏览器访问 Agent Sandbox 的鉴权代理,生产环境应通过独立域名反向代理 3006 端口。
fastgpt-agent-sandbox-proxy:
image: ${{agent-sandbox-proxy.image}}:${{agent-sandbox-proxy.tag}}
container_name: fastgpt-agent-sandbox-proxy
restart: always
networks:
- app
ports:
- 3006:1006
environment:
<<: [*x-no-proxy-config]
PORT: 1006
AGENT_SANDBOX_PROXY_SECRET: *x-agent-sandbox-proxy-secret
FASTGPT_APP_URL: http://fastgpt-app:3000
FASTGPT_APP_REQUEST_TIMEOUT_SECS: 60
RUST_LOG: info,fastgpt_agent_sandbox_proxy=debug
# AI Proxy
fastgpt-aiproxy:
image: ${{aiproxy.image}}:${{aiproxy.tag}}
......@@ -479,4 +565,26 @@ volumes:
fastgpt-seekdb-config:
fastgpt-aiproxy_pg:
# ${{vec.extraBlock}}
configs:
opensandbox-config:
content: |
[server]
host = "0.0.0.0"
port = 8090
api_key = "fastgpt-opensandbox-api-key"
log_level = "INFO"
[runtime]
type = "docker"
execd_image = "${{opensandbox-execd.image}}:${{opensandbox-execd.tag}}"
[egress]
image = "${{opensandbox-egress.image}}:${{opensandbox-egress.tag}}"
[docker]
network_mode = "bridge"
host_ip = "host.docker.internal"
[ingress]
mode = "direct"
# ${{vec.extraEntries}}
---
title: General Sandbox Configuration
description: General FastGPT Agent Sandbox configuration
---
This page covers shared Agent Sandbox configuration for both `opensandbox` and `sealosdevbox`. Provider-specific settings are documented on each provider page. Regardless of the provider, you need to deploy `fastgpt-agent-sandbox-proxy` and optionally configure package mirrors for the sandbox runtime.
## Deploy sandbox-proxy
### 1. Add the yml service
Use [agent-sandbox-proxy.yml](/deploy/sandbox_deploy/agent-proxy.yml) as a reference and add the service to your yml file. Expose the external access port and record the `AGENT_SANDBOX_PROXY_SECRET` value, which you will need in the next step.
FastGPT uses this proxy when accessing the sandbox file system.
**Proxy service environment variables**
| Variable | Default | Description |
| ---------------------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `PORT` | `1006` | Listening port for `fastgpt-agent-sandbox-proxy`. |
| `AGENT_SANDBOX_PROXY_SECRET` | None | Secret shared with the FastGPT main service. Must be at least 32 characters. |
| `FASTGPT_APP_URL` | `http://fastgpt-app:3000` | Internal URL of the FastGPT main service. The proxy and FastGPT must be able to reach each other on the network. |
| `FASTGPT_APP_REQUEST_TIMEOUT_SECS` | `10` | Timeout, in seconds, for proxy requests back to the FastGPT main service. Increase it if sandbox cold starts take longer. |
| `RUST_LOG` | `info,fastgpt_agent_sandbox_proxy=debug` | Log level for the proxy service. |
### 2. Update FastGPT environment variables
Add the following three environment variables to `fastgpt-app`:
```dotenv
# Must match AGENT_SANDBOX_PROXY_SECRET in fastgpt-agent-sandbox-proxy. Use a random secret longer than 32 characters in production.
AGENT_SANDBOX_PROXY_SECRET=replace_with_32_chars_random_secret
# Browser-accessible WebSocket URL for agent-sandbox-proxy. Use wss:// when proxying through an HTTPS domain.
AGENT_SANDBOX_PROXY_URL=wss://sandbox-proxy.example.com
# Browser-accessible HTTP(S) URL for Sandbox file previews
AGENT_SANDBOX_PREVIEW_PROXY_URL=https://sandbox-proxy.example.com
```
`fastgpt-pro` does not provide the Sandbox Editor or WebSocket proxy path, so it does not require `AGENT_SANDBOX_PROXY_SECRET` or `AGENT_SANDBOX_PROXY_URL`. However, when Agent Sandbox is enabled, you must add `AGENT_SANDBOX_PREVIEW_PROXY_URL` to `fastgpt-pro`. It can use the same value as `fastgpt-app`.
We strongly recommend hosting the preview proxy on an origin separate from the FastGPT application, with a different scheme, host, or port. HTML files in a Sandbox may contain user-generated scripts. If previews share the FastGPT application origin, those scripts run inside the application's same-origin security boundary and may be able to access application credentials or APIs. FastGPT currently validates only that this variable uses `http://` or `https://`; it does not enforce origin isolation.
Preview URLs are temporary, read-only bearer capabilities. Anyone with a URL can change its path to read other files in the same Sandbox Workspace while the URL remains valid. Do not share a preview URL with anyone who should not have access to that Workspace.
### 3. Verify startup
1. Restart `fastgpt-app`, `fastgpt-pro`, and `fastgpt-agent-sandbox-proxy`.
2. Visit `https://agent-proxy-domain/health`. It should return `OK`.
### 4. Deploy a sandbox provider
After deploying the proxy service, connect one of the supported sandbox providers:
- [Sealos Cloud Sandbox](./sealosdevbox)
- [OpenSandbox Deployment](./opensandbox)
## Additional Configuration
### Custom package mirrors
If the sandbox needs to install npm or Python dependencies, configure package mirrors in both `fastgpt-app` and `fastgpt-pro`. During Agent Sandbox initialization, FastGPT writes these settings for npm, yarn, pnpm, bun, pip, and uv.
```dotenv
# npm registry used by npm/yarn/pnpm/bun inside Agent Sandbox
AGENT_SANDBOX_NPM_REGISTRY=https://registry.npmmirror.com
# PyPI index URL used by pip/python -m pip/uv inside Agent Sandbox
AGENT_SANDBOX_PYPI_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
```
### Resource limit variables
Configure the following variables in `fastgpt-app` and `fastgpt-pro` when you need to adjust resource limits:
| Variable | Default | Description |
| ------------------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------------------ |
| `AGENT_SANDBOX_CPU_COUNT` | `1` | Maximum CPU count for each Agent Sandbox instance. |
| `AGENT_SANDBOX_MEMORY_MIB` | `2048` | Maximum memory for each Agent Sandbox instance, in MiB. |
| `AGENT_SANDBOX_STORAGE_SIZE_GI` | `1` | Agent Sandbox storage size in Gi. FastGPT derives its archive, Skill, and single-file limits as storage in MB / 2 - 150. |
| `AGENT_SANDBOX_WS_MAX_MESSAGE_BYTES` | `67108864` | Maximum IDE Agent WebSocket message size in bytes. |
| `AGENT_SANDBOX_WS_MAX_FRAME_BYTES` | `16777216` | Maximum IDE Agent WebSocket frame size in bytes. |
### Lifecycle variables
| Variable | Default | Description |
| ------------------------------------- | ------- | ----------------------------------------------------------------------- |
| `AGENT_SANDBOX_SUSPEND_MINUTES` | `60` | Number of inactive minutes before a running Agent Sandbox is suspended. |
| `AGENT_SANDBOX_ARCHIVE_INACTIVE_DAYS` | `7` | Number of inactive days before a suspended Agent Sandbox is archived. |
## FAQ
### AGENT_SANDBOX_PROXY_URL or AGENT_SANDBOX_PREVIEW_PROXY_URL is required
After Agent Sandbox is enabled, `fastgpt-app` requires `AGENT_SANDBOX_PROXY_SECRET`, `AGENT_SANDBOX_PROXY_URL`, and `AGENT_SANDBOX_PREVIEW_PROXY_URL`. `fastgpt-pro` requires only `AGENT_SANDBOX_PREVIEW_PROXY_URL`. You must add the preview proxy URL, such as `https://sandbox-proxy.example.com`, to both services.
### Browser WebSocket connection fails
Check that the proxy service is reachable from the browser and that your reverse proxy supports WebSocket Upgrade. If FastGPT is accessed over HTTPS, `AGENT_SANDBOX_PROXY_URL` should use `wss://` to avoid mixed-content blocking.
### proxy validation fails or returns 401
Make sure `AGENT_SANDBOX_PROXY_SECRET` is exactly the same in the FastGPT main service and `fastgpt-agent-sandbox-proxy`, and that it is at least 32 characters long.
---
title: 沙盒通用配置
description: FastGPT Agent Sandbox 通用配置
---
本文说明 Agent Sandbox 的通用配置,适用于 `opensandbox` 和 `sealosdevbox`。Provider 自身的接入参数请参考对应 Provider 文档;无论选择哪种 Provider,都需要部署 `fastgpt-agent-sandbox-proxy`,并按需配置沙盒内依赖源。
## 部署 sandbox-proxy
### 1. 添加 yml
可以参考 [agent-sandbox-proxy.yml](/deploy/sandbox_deploy/agent-proxy.yml),将 service 加到 yml 文件里。并开放外网访问端口。并记录 `AGENT_SANDBOX_PROXY_SECRET` 环境变量,下一步需要使用。
FastGPT 服务里访问沙盒内部文件系统,会通过 proxy 去代理访问。
**proxy 服务环境变量**
| 变量 | 默认值 | 说明 |
| ---------------------------------- | ---------------------------------------- | ------------------------------------------------------------------------- |
| `PORT` | `1006` | `fastgpt-agent-sandbox-proxy` 监听端口。 |
| `AGENT_SANDBOX_PROXY_SECRET` | 无 | 与 FastGPT 主服务共用的密钥,至少 32 位。 |
| `FASTGPT_APP_URL` | `http://fastgpt-app:3000` | 代理回源 FastGPT 主服务的内网地址,要求两个服务在一个互通网络。 |
| `FASTGPT_APP_REQUEST_TIMEOUT_SECS` | `10` | 代理回源 FastGPT 主服务的请求超时时间,单位秒。沙盒冷启动较慢时建议调大。 |
| `RUST_LOG` | `info,fastgpt_agent_sandbox_proxy=debug` | 代理服务日志级别。 |
### 2. 修改 FastGPT 环境变量
在 `fastgpt-app` 中增加下面三项环境变量:
```dotenv
# 对应 fastgpt-agent-sandbox-proxy 的变量 AGENT_SANDBOX_PROXY_SECRET。生产环境请改为 32 位以上随机密钥
AGENT_SANDBOX_PROXY_SECRET=replace_with_32_chars_random_secret
# 浏览器可访问的 agent-sandbox-proxy WebSocket 地址;如已通过 HTTPS 域名代理,请使用 wss://
AGENT_SANDBOX_PROXY_URL=wss://sandbox-proxy.example.com
# 浏览器访问 Sandbox 文件预览的 HTTP(S) 地址
AGENT_SANDBOX_PREVIEW_PROXY_URL=https://sandbox-proxy.example.com
```
`fastgpt-pro` 不提供 Sandbox Editor 和 WebSocket proxy 链路,因此不要求 `AGENT_SANDBOX_PROXY_SECRET` 和 `AGENT_SANDBOX_PROXY_URL`,但启用 Agent Sandbox 时必须增加 `AGENT_SANDBOX_PREVIEW_PROXY_URL`。该变量可以与 `fastgpt-app` 使用相同的值。
强烈建议将预览代理部署在与 FastGPT 主站不同的 origin(协议、域名或端口至少一项不同)。Sandbox 中的 HTML 可能包含用户生成的脚本;如果预览地址与 FastGPT 主站同源,这些脚本会处于主站的同源安全边界内,可能访问主站凭证或接口。FastGPT 当前只校验该变量使用 `http://` 或 `https://`,不会强制检查 origin 是否隔离。
预览链接是短期只读 bearer capability。任何获得链接的人都可以在链接有效期内通过修改 URL 路径读取同一 Sandbox Workspace 中的其他文件,因此不要把预览链接分享给不应访问该 Workspace 的用户。
### 3. 启动验证
1. 重启 `fastgpt-app`、`fastgpt-pro` 和 `fastgpt-agent-sandbox-proxy`。
2. 访问 `https://agent-proxy域名/health`,正常返回 `OK`。
### 4. 部署沙盒服务
部署完 proxy 服务后,还需接入沙盒控制服务,目前系统支持以下两种方案:
- [Sealos cloud 沙盒接入](./sealosdevbox)
- [Opensandbox 部署方案](./opensandbox)
## 更多配置
### 自定义源
如果沙盒内需要安装 npm 或 Python 依赖,可以在 `fastgpt-app` 和 `fastgpt-pro` 中配置依赖源。配置后,Agent Sandbox 初始化时会写入 npm、yarn、pnpm、bun、pip 和 uv 的源配置。
```dotenv
# Agent Sandbox 内 npm/yarn/pnpm/bun 使用的 npm registry
AGENT_SANDBOX_NPM_REGISTRY=https://registry.npmmirror.com
# Agent Sandbox 内 pip/python -m pip/uv 使用的 PyPI index URL
AGENT_SANDBOX_PYPI_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
```
### 资源限制变量
`fastpgt-app` 和 `fastgpt-pro` 中你可以通过以下变量控制资源限制:
| 变量 | 默认值 | 说明 |
| ------------------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------- |
| `AGENT_SANDBOX_CPU_COUNT` | `1` | Agent Sandbox 单实例 CPU 核数上限。 |
| `AGENT_SANDBOX_MEMORY_MIB` | `2048` | Agent Sandbox 单实例内存上限,单位 MiB。 |
| `AGENT_SANDBOX_STORAGE_SIZE_GI` | `1` | Agent Sandbox 存储容量,单位 Gi;同时按“存储容量换算为 MB / 2 - 150”计算 FastGPT 的归档、Skill 和单文件限制。 |
| `AGENT_SANDBOX_WS_MAX_MESSAGE_BYTES` | `67108864` | IDE Agent WebSocket 单消息大小上限,单位字节。 |
| `AGENT_SANDBOX_WS_MAX_FRAME_BYTES` | `16777216` | IDE Agent WebSocket 单帧大小上限,单位字节。 |
### 生命周期变量
| 变量 | 默认值 | 说明 |
| ------------------------------------- | ------ | ------------------------------------------------- |
| `AGENT_SANDBOX_SUSPEND_MINUTES` | `60` | 运行中的 Agent 沙箱持续未活跃多少分钟后自动暂停。 |
| `AGENT_SANDBOX_ARCHIVE_INACTIVE_DAYS` | `7` | 已暂停的 Agent 沙箱持续未活跃多少天后自动归档。 |
## 常见问题
### 提示 AGENT_SANDBOX_PROXY_URL 或 AGENT_SANDBOX_PREVIEW_PROXY_URL is required
启用 Agent Sandbox 后,`fastgpt-app` 必须配置 `AGENT_SANDBOX_PROXY_SECRET`、`AGENT_SANDBOX_PROXY_URL` 和 `AGENT_SANDBOX_PREVIEW_PROXY_URL`;`fastgpt-pro` 只强制要求 `AGENT_SANDBOX_PREVIEW_PROXY_URL`。两个服务都必须新增预览代理地址,例如 `https://sandbox-proxy.example.com`。
### 浏览器 WebSocket 连接失败
检查代理服务是否能被浏览器访问,并确认反向代理已支持 WebSocket Upgrade。如果 FastGPT 通过 HTTPS 访问,`AGENT_SANDBOX_PROXY_URL` 也应使用 `wss://`,避免浏览器拦截混合内容。
### proxy 校验失败或返回 401
确认 FastGPT 主服务和 `fastgpt-agent-sandbox-proxy` 中的 `AGENT_SANDBOX_PROXY_SECRET` 完全一致,并且长度不少于 32 位。
{
"title": "Sandbox Configuration",
"description": "FastGPT Agent Sandbox deployment configuration",
"pages": ["common", "sealosdevbox", "opensandbox"]
"description": "FastGPT Agent Sandbox configuration",
"pages": ["opensandbox", "sealosdevbox"]
}
{
"title": "沙盒配置",
"description": "FastGPT Agent Sandbox 部署配置",
"pages": ["common", "sealosdevbox", "opensandbox"]
"description": "FastGPT Agent Sandbox 配置",
"pages": ["opensandbox", "sealosdevbox"]
}
......@@ -14,6 +14,7 @@ import { Alert } from '@/components/docs/Alert';
1. FastGPT commercial edition is deployed, and the team has Agent Sandbox access.
2. Request Sealos Devbox connection details from support: Devbox service URL, access token, and runtime image.
3. Follow [OpenSandbox Configuration](./opensandbox) to deploy `fastgpt-agent-sandbox-proxy`.
## Configure FastGPT Environment Variables
......@@ -41,7 +42,7 @@ AGENT_SANDBOX_STORAGE_SIZE_GI=1
### AGENT_SANDBOX_PROXY_URL or AGENT_SANDBOX_PREVIEW_PROXY_URL is required
After `AGENT_SANDBOX_PROVIDER=sealosdevbox` is enabled, `fastgpt-app` requires both `AGENT_SANDBOX_PROXY_URL` and `AGENT_SANDBOX_PREVIEW_PROXY_URL`, while `fastgpt-pro` requires `AGENT_SANDBOX_PREVIEW_PROXY_URL`. See [General Sandbox Configuration](./common) for details.
After `AGENT_SANDBOX_PROVIDER=sealosdevbox` is enabled, `fastgpt-app` requires `AGENT_SANDBOX_PROXY_SECRET`, `AGENT_SANDBOX_PROXY_URL`, and `AGENT_SANDBOX_PREVIEW_PROXY_URL`, while `fastgpt-pro` requires `AGENT_SANDBOX_PREVIEW_PROXY_URL`. The proxy secret must match the value configured for `fastgpt-agent-sandbox-proxy` and contain at least 32 characters.
### AGENT_SANDBOX_SEALOS_IMAGE is required
......
......@@ -13,6 +13,7 @@ import { Alert } from '@/components/docs/Alert';
1. 已部署 FastGPT 商业版,并确认团队拥有 Agent Sandbox 使用权限。
2. 向客服申请 Sealos Devbox 接入信息:Devbox 服务地址、访问 Token、运行态镜像。
3. 参考 [OpenSandbox 配置](./opensandbox) 部署 `fastgpt-agent-sandbox-proxy` 服务。
## 配置 FastGPT 环境变量
......@@ -40,7 +41,7 @@ AGENT_SANDBOX_STORAGE_SIZE_GI=1
### 提示 AGENT_SANDBOX_PROXY_URL 或 AGENT_SANDBOX_PREVIEW_PROXY_URL is required
启用 `AGENT_SANDBOX_PROVIDER=sealosdevbox` 后,`fastgpt-app` 必须配置 `AGENT_SANDBOX_PROXY_URL` 和 `AGENT_SANDBOX_PREVIEW_PROXY_URL`,`fastgpt-pro` 必须配置 `AGENT_SANDBOX_PREVIEW_PROXY_URL`。具体要求见[沙盒通用配置](./common)
启用 `AGENT_SANDBOX_PROVIDER=sealosdevbox` 后,`fastgpt-app` 必须配置 `AGENT_SANDBOX_PROXY_SECRET`、`AGENT_SANDBOX_PROXY_URL` 和 `AGENT_SANDBOX_PREVIEW_PROXY_URL`,`fastgpt-pro` 必须配置 `AGENT_SANDBOX_PREVIEW_PROXY_URL`。Proxy Secret 需与 `fastgpt-agent-sandbox-proxy` 服务中的值一致,且不少于 32 位
### 提示 AGENT_SANDBOX_SEALOS_IMAGE is required
......
......@@ -132,14 +132,24 @@ Refer to https://doc.fastgpt.cn/deploy/SKILL.md and deploy FastGPT with Docker f
Run in Linux/MacOS/Windows WSL. The script guides you through selecting deployment environment, vector database version, IP address, etc.
```bash
bash <(curl -fsSL https://doc.fastgpt.cn/deploy/install.sh)
FASTGPT_DEPLOY_BASE_URL=https://doc.fastgpt.cn bash <(curl -fsSL https://doc.fastgpt.cn/deploy/install.sh)
```
<CurrentOriginCodeBlockUpdater />
If the documentation site uses a custom domain, an internal domain, or a local address, set `FASTGPT_DEPLOY_BASE_URL` to choose the download source. You can provide either the site root or a URL ending in `/deploy`; the script downloads YAML and `config.json` from that source:
```bash
FASTGPT_DEPLOY_BASE_URL=https://doc.fastgpt.cn bash <(curl -fsSL https://doc.fastgpt.cn/deploy/install.sh)
```
<CurrentOriginCodeBlockUpdater />
Non-interactive mode also requires `FASTGPT_FE_DOMAIN`, the full URL users use to access FastGPT, such as `https://fastgpt.example.com`, and `FASTGPT_SANDBOX_PROXY_URL`, the Sandbox WebSocket URL, such as `wss://sandbox-proxy.example.com`. Version 4.16 also requires `FASTGPT_SANDBOX_PREVIEW_PROXY_URL` for the HTTP preview URL. In interactive mode, the script prompts for the addresses required by each version; 4.15 prompts only for the WebSocket URL.
The script automatically:
- Downloads or copies `docker-compose.yml`.
- Downloads `docker-compose.yml`.
- Guides you through selecting externally accessible S3 and MCP addresses, then writes them into the config files.
- Generates a random `root` login password, service tokens, app keys, and component passwords, then writes them into `docker-compose.yml`.
- Detects the host Docker socket path and updates the mount path in `docker-compose.yml` when needed.
......@@ -164,24 +174,26 @@ If you need to pin deployment to a specific `docker-compose.yml` file, we recomm
curl -fsSL https://doc.fastgpt.cn/deploy/docker/v4.15/cn/docker-compose.pg.yml -o docker-compose.source.yml
```
<CurrentOriginCodeBlockUpdater />
<details>
<summary>Click to view docker-compose config file download links for different databases</summary>
- **Pgvector**
- China mirror (Alibaba Cloud): [docker-compose.pg.yml](https://doc.fastgpt.cn/deploy/docker/v4.15/cn/docker-compose.pg.yml)
- Global mirror (dockerhub, ghcr): [docker-compose.pg.yml](https://doc.fastgpt.cn/deploy/docker/v4.15/global/docker-compose.pg.yml)
- China mirror (Alibaba Cloud): [docker-compose.pg.yml](/deploy/docker/v4.15/cn/docker-compose.pg.yml)
- Global mirror (dockerhub, ghcr): [docker-compose.pg.yml](/deploy/docker/v4.15/global/docker-compose.pg.yml)
- **Oceanbase**
- China mirror (Alibaba Cloud): [docker-compose.oceanbase.yml](https://doc.fastgpt.cn/deploy/docker/v4.15/cn/docker-compose.oceanbase.yml)
- Global mirror (dockerhub, ghcr): [docker-compose.oceanbase.yml](https://doc.fastgpt.cn/deploy/docker/v4.15/global/docker-compose.oceanbase.yml)
- China mirror (Alibaba Cloud): [docker-compose.oceanbase.yml](/deploy/docker/v4.15/cn/docker-compose.oceanbase.yml)
- Global mirror (dockerhub, ghcr): [docker-compose.oceanbase.yml](/deploy/docker/v4.15/global/docker-compose.oceanbase.yml)
- **Milvus**
- China mirror (Alibaba Cloud): [docker-compose.milvus.yml](https://doc.fastgpt.cn/deploy/docker/v4.15/cn/docker-compose.milvus.yml)
- Global mirror (dockerhub, ghcr): [docker-compose.milvus.yml](https://doc.fastgpt.cn/deploy/docker/v4.15/global/docker-compose.milvus.yml)
- China mirror (Alibaba Cloud): [docker-compose.milvus.yml](/deploy/docker/v4.15/cn/docker-compose.milvus.yml)
- Global mirror (dockerhub, ghcr): [docker-compose.milvus.yml](/deploy/docker/v4.15/global/docker-compose.milvus.yml)
- **Zilliz**
- China mirror (Alibaba Cloud): [docker-compose.zilliz.yml](https://doc.fastgpt.cn/deploy/docker/v4.15/cn/docker-compose.zilliz.yml)
- Global mirror (dockerhub, ghcr): [docker-compose.zilliz.yml](https://doc.fastgpt.cn/deploy/docker/v4.15/global/docker-compose.zilliz.yml)
- China mirror (Alibaba Cloud): [docker-compose.zilliz.yml](/deploy/docker/v4.15/cn/docker-compose.zilliz.yml)
- Global mirror (dockerhub, ghcr): [docker-compose.zilliz.yml](/deploy/docker/v4.15/global/docker-compose.zilliz.yml)
- **SeekDB**
- China mirror (Alibaba Cloud): [docker-compose.seekdb.yml](https://doc.fastgpt.cn/deploy/docker/v4.15/cn/docker-compose.seekdb.yml)
- Global mirror (dockerhub, ghcr): [docker-compose.seekdb.yml](https://doc.fastgpt.cn/deploy/docker/v4.15/global/docker-compose.seekdb.yml)
- China mirror (Alibaba Cloud): [docker-compose.seekdb.yml](/deploy/docker/v4.15/cn/docker-compose.seekdb.yml)
- Global mirror (dockerhub, ghcr): [docker-compose.seekdb.yml](/deploy/docker/v4.15/global/docker-compose.seekdb.yml)
</details>
......@@ -211,10 +223,19 @@ If you use an internal Harbor, private registry, or image mirror, download `dock
FASTGPT_LOCAL_COMPOSE_PATH=./docker-compose.yml bash install.sh
```
If Agent/Skill Sandbox is enabled, deploy `fastgpt-agent-sandbox-proxy` separately and also replace `AGENT_SANDBOX_SEALOS_IMAGE` or `AGENT_SANDBOX_OPENSANDBOX_IMAGE` so the sandbox provider can pull the `fastgpt-agent-sandbox` image. The v4.15.0 default deployment file does not include `fastgpt-agent-sandbox-proxy` or start OpenSandbox by default. See the [V4.15.0 upgrade notes](../upgrading/4-15/41500.en.mdx#5-agent-sandbox-deployment-options) for sandbox provider setup.
If Agent/Skill Sandbox is enabled, also replace the sandbox-related images in the Compose file and update `AGENT_SANDBOX_SEALOS_IMAGE` or `AGENT_SANDBOX_OPENSANDBOX_IMAGE` so the sandbox provider can pull the matching images. See [OpenSandbox Configuration](../config/sandbox/opensandbox) for details.
### 2. Modify Environment Variables
You must set `FE_DOMAIN` in `fastgpt-app` to the full URL users use to access FastGPT, such as `https://fastgpt.example.com`. It must include a scheme, host, and optional port; do not leave it empty or use an internal container address.
When Agent/Skill Sandbox is enabled, also configure:
- `AGENT_SANDBOX_PROXY_URL`: the browser-accessible Sandbox Proxy WebSocket URL using `ws://` or `wss://`, such as `wss://sandbox-proxy.example.com`, pointing to port 3006.
- Version 4.16 additionally requires `AGENT_SANDBOX_PREVIEW_PROXY_URL`: the browser-accessible HTTP(S) URL for sandbox file previews, such as `https://sandbox-proxy.example.com`, also pointing to port 3006.
The interactive install script prompts for these addresses before the final confirmation.
For `Zilliz version`, you also need credentials — see [Deploy Zilliz Version: Get Account and Credentials](#deploy-zilliz-version-get-account-and-credentials). Other versions can skip to the next step.
### 3. Open External Ports / Configure Domain
......@@ -224,12 +245,16 @@ These ports must be accessible:
1. Port 3000 (FastGPT main service)
2. Port 9000 (S3 service)
3. Port 3003 (FastGPT SSE MCP server service)
4. Port 3006 (FastGPT Agent Sandbox Proxy service)
### 4. Start Containers
Run in the same directory as docker-compose.yml. Ensure `docker-compose` version is 2.17+, or automated commands may fail.
```bash
# Pre-pull all service and sandbox runtime images
docker compose --profile prepull pull
# Start containers
docker compose up -d
```
......
......@@ -132,14 +132,16 @@ brew install orbstack
需要在 Linux/MacOS/Windows WSL 环境下执行,引导用户选择部署环境、向量库版本,IP 地址等。
```bash
bash <(curl -fsSL https://doc.fastgpt.cn/deploy/install.sh)
FASTGPT_DEPLOY_BASE_URL=https://doc.fastgpt.cn bash <(curl -fsSL https://doc.fastgpt.cn/deploy/install.sh)
```
<CurrentOriginCodeBlockUpdater />
非交互模式还必须通过 `FASTGPT_FE_DOMAIN` 指定用户访问 FastGPT 的完整地址,例如 `https://fastgpt.example.com`,并通过 `FASTGPT_SANDBOX_PROXY_URL` 指定沙盒 WebSocket 地址,例如 `wss://sandbox-proxy.example.com`。4.16 还需要通过 `FASTGPT_SANDBOX_PREVIEW_PROXY_URL` 指定 HTTP 预览地址。交互模式下脚本会按版本询问这些地址;4.15 只询问 WebSocket 地址。
脚本会自动完成以下操作:
- 下载或复制 `docker-compose.yml`。
- 下载 `docker-compose.yml`。
- 引导选择 S3 与 MCP 的外部访问地址,并写入配置文件。
- 随机生成 `root` 登录密码、服务间 Token、应用密钥和组件密码,并写入 `docker-compose.yml`。
- 自动检测宿主机 Docker socket 路径,必要时替换 `docker-compose.yml` 中的挂载路径。
......@@ -156,24 +158,26 @@ bash <(curl -fsSL https://doc.fastgpt.cn/deploy/install.sh)
curl -fsSL https://doc.fastgpt.cn/deploy/docker/v4.15/cn/docker-compose.pg.yml -o docker-compose.source.yml
```
<CurrentOriginCodeBlockUpdater />
<details>
<summary>点击展开查看不同数据库的 docker-compose 配置文件下载地址</summary>
- **Pgvector**
- 中国大陆地区镜像源(阿里云):[docker-compose.pg.yml](https://doc.fastgpt.cn/deploy/docker/v4.15/cn/docker-compose.pg.yml)
- 全球镜像源(dockerhub, ghcr):[docker-compose.pg.yml](https://doc.fastgpt.cn/deploy/docker/v4.15/global/docker-compose.pg.yml)
- 中国大陆地区镜像源(阿里云):[docker-compose.pg.yml](/deploy/docker/v4.15/cn/docker-compose.pg.yml)
- 全球镜像源(dockerhub, ghcr):[docker-compose.pg.yml](/deploy/docker/v4.15/global/docker-compose.pg.yml)
- **Oceanbase**
- 中国大陆地区镜像源(阿里云):[docker-compose.oceanbase.yml](https://doc.fastgpt.cn/deploy/docker/v4.15/cn/docker-compose.oceanbase.yml)
- 全球镜像源(dockerhub, ghcr):[docker-compose.oceanbase.yml](https://doc.fastgpt.cn/deploy/docker/v4.15/global/docker-compose.oceanbase.yml)
- 中国大陆地区镜像源(阿里云):[docker-compose.oceanbase.yml](/deploy/docker/v4.15/cn/docker-compose.oceanbase.yml)
- 全球镜像源(dockerhub, ghcr):[docker-compose.oceanbase.yml](/deploy/docker/v4.15/global/docker-compose.oceanbase.yml)
- **Milvus**
- 中国大陆地区镜像源(阿里云):[docker-compose.milvus.yml](https://doc.fastgpt.cn/deploy/docker/v4.15/cn/docker-compose.milvus.yml)
- 全球镜像源(dockerhub, ghcr):[docker-compose.milvus.yml](https://doc.fastgpt.cn/deploy/docker/v4.15/global/docker-compose.milvus.yml)
- 中国大陆地区镜像源(阿里云):[docker-compose.milvus.yml](/deploy/docker/v4.15/cn/docker-compose.milvus.yml)
- 全球镜像源(dockerhub, ghcr):[docker-compose.milvus.yml](/deploy/docker/v4.15/global/docker-compose.milvus.yml)
- **Zilliz**
- 中国大陆地区镜像源(阿里云):[docker-compose.zilliz.yml](https://doc.fastgpt.cn/deploy/docker/v4.15/cn/docker-compose.zilliz.yml)
- 全球镜像源(dockerhub, ghcr):[docker-compose.zilliz.yml](https://doc.fastgpt.cn/deploy/docker/v4.15/global/docker-compose.zilliz.yml)
- 中国大陆地区镜像源(阿里云):[docker-compose.zilliz.yml](/deploy/docker/v4.15/cn/docker-compose.zilliz.yml)
- 全球镜像源(dockerhub, ghcr):[docker-compose.zilliz.yml](/deploy/docker/v4.15/global/docker-compose.zilliz.yml)
- **SeekDB**
- 中国大陆地区镜像源(阿里云):[docker-compose.seekdb.yml](https://doc.fastgpt.cn/deploy/docker/v4.15/cn/docker-compose.seekdb.yml)
- 全球镜像源(dockerhub, ghcr):[docker-compose.seekdb.yml](https://doc.fastgpt.cn/deploy/docker/v4.15/global/docker-compose.seekdb.yml)
- 中国大陆地区镜像源(阿里云):[docker-compose.seekdb.yml](/deploy/docker/v4.15/cn/docker-compose.seekdb.yml)
- 全球镜像源(dockerhub, ghcr):[docker-compose.seekdb.yml](/deploy/docker/v4.15/global/docker-compose.seekdb.yml)
</details>
......@@ -203,10 +207,19 @@ FASTGPT_LOCAL_COMPOSE_PATH=./docker-compose.source.yml bash install.sh
FASTGPT_LOCAL_COMPOSE_PATH=./docker-compose.yml bash install.sh
```
如果启用 Agent/Skill 沙盒,还需要单独部署 `fastgpt-agent-sandbox-proxy`,并同步替换 `AGENT_SANDBOX_SEALOS_IMAGE` 或 `AGENT_SANDBOX_OPENSANDBOX_IMAGE`,确保沙盒 provider 可以拉取 `fastgpt-agent-sandbox` 镜像。v4.15.0 默认部署文件不内置 `fastgpt-agent-sandbox-proxy`,也不会默认启动 OpenSandbox;沙盒 provider 的接入方式见 [V4.15.0 升级说明](../upgrading/4-15/41500.mdx#5-agent-sandbox-部署方案)。
如果启用 Agent/Skill 沙盒,还需要同步替换 Compose 文件中的沙盒相关镜像,以及 `AGENT_SANDBOX_SEALOS_IMAGE` 或 `AGENT_SANDBOX_OPENSANDBOX_IMAGE`,确保沙盒 provider 可以拉取对应镜像。具体配置见 [OpenSandbox 配置](../config/sandbox/opensandbox)。
### 2. 修改环境变量
必须填写 `fastgpt-app` 中的 `FE_DOMAIN`,设置为用户实际访问 FastGPT 的完整地址,例如 `https://fastgpt.example.com`。该地址由协议、主机和可选端口组成,不能留空,也不要填写容器内部地址。
启用 Agent/Skill 沙盒时还必须配置:
- `AGENT_SANDBOX_PROXY_URL`:浏览器访问 Sandbox Proxy 的 WebSocket 地址,使用 `ws://` 或 `wss://`,例如 `wss://sandbox-proxy.example.com`,需要指向 3006 端口。
- 4.16 版本额外配置 `AGENT_SANDBOX_PREVIEW_PROXY_URL`:浏览器访问沙盒文件预览的 HTTP(S) 地址,例如 `https://sandbox-proxy.example.com`,同样需要指向 3006 端口。
使用交互式安装脚本时,脚本会在确认部署前询问这些地址。
对于 `Zilliz 版本` 还需要获取密钥,参考 [部署 Zilliz 版本获取账号和密钥](#部署-zilliz-版本获取账号和密钥), 其他版本可直接下一步。
### 3. 开放外网端口/配置域名
......@@ -216,12 +229,16 @@ FASTGPT_LOCAL_COMPOSE_PATH=./docker-compose.yml bash install.sh
1. 3000 端口(FastGPT 主服务)
2. 9000 端口(S3 服务)
3. 3003 端口(FastGPT SSE MCP server 服务)
4. 3006 端口(FastGPT Agent Sandbox Proxy 服务)
### 4. 启动容器
在 docker-compose.yml 同级目录下执行。请确保 `docker-compose` 版本最好在 2.17 以上,否则可能无法执行自动化命令。
```bash
# 预拉取所有服务及沙盒运行时镜像
docker compose --profile prepull pull
# 启动容器
docker compose up -d
```
......
......@@ -208,13 +208,12 @@ DEPLOYMENT_ENVIRONMENT=
### 2. OpenSandbox Changes (as needed)
OpenSandbox and other sandbox provider settings have moved to [Sandbox Configuration](../../config/sandbox/common) and are no longer built into the deployment yml.
See the [4.15 deployment YAML](https://doc.fastgpt.cn/deploy/docker/v4.15/cn/docker-compose.pg.yml) for the complete OpenSandbox setup. The 4.15 Docker Compose deployment file already includes OpenSandbox Server, Volume Manager, Agent Sandbox Proxy, and the image pre-pull services.
For this upgrade, focus on:
1. Deploying the `agent-sandbox-proxy` service.
2. Updating OpenSandbox-related image versions.
3. Updating related environment variables in `fastgpt-app` and `fastgpt-pro`.
1. Using the new Docker Compose deployment file, which includes the OpenSandbox services.
2. Updating OpenSandbox environment variables in `fastgpt-app` and `fastgpt-pro`.
You can overwrite your deployment directly with the new OpenSandbox template.
......
......@@ -207,13 +207,12 @@ DEPLOYMENT_ENVIRONMENT=
### 2. OpenSandbox 调整(按需)
Opensandbox 和其他沙盒提供商的配置单独移动到[沙盒配置](../../config/sandbox/common)内,并不再内置到部署 yml 中
OpenSandbox 的完整配置请参考 [4.15 部署 yml](https://doc.fastgpt.cn/deploy/docker/v4.15/cn/docker-compose.pg.yml)。4.15 的 Docker Compose 部署文件已经内置 OpenSandbox Server、Volume Manager、Agent Sandbox Proxy 和预拉取镜像服务
本次升级主要需修改以下内容:
1. 新部署 `agent-sandbox-proxy` 服务。
2. 更新 `opensandbox` 相关镜像版本。
3. 修改 `fastgpt-app` 和 `fastgpt-pro` 里部分环境变量。
1. 使用新版 Docker Compose 部署文件,其中已包含 OpenSandbox 相关服务。
2. 修改 `fastgpt-app` 和 `fastgpt-pro` 里的 OpenSandbox 环境变量。
可以直接按新的 OpenSandbox 模板进行覆盖部署即可。
......
---
title: 'V4.15.7'
description: 'FastGPT V4.15.7 Release Notes'
---
## 📦 Upgrade Guide
### Image Changes
- Update the fastgpt-app (FastGPT core service) image tag to v4.15.7.
- Update the fastgpt-pro (FastGPT commercial edition) image tag to v4.15.7.
## 🐛 Fixes
1. Fixed duplicate request headers when MCP falls back to SSE after a failed Streamable HTTP connection.
2. Limited portal quick apps to 3 and added validation for legacy configurations that contain more than the allowed number.
3. Fixed published apps incorrectly rejecting uploads when file variables allow file uploads but the app-level upload configuration is disabled.
---
title: 'V4.15.7'
description: 'FastGPT V4.15.7 更新说明'
---
## 📦 升级指南
### 镜像变更
- 更新 fastgpt-app(FastGPT 主服务)镜像 tag:v4.15.7
- 更新 fastgpt-pro(FastGPT 商业版)镜像 tag:v4.15.7
## 🐛 修复
1. 修复 MCP 使用 Streamable HTTP 连接失败并回退到 SSE 时,请求头可能被重复发送的问题。
2. 门户页快捷应用数量上限调整为 3 个,并兼容校验历史配置中超过上限的快捷应用。
3. 修复应用发布后,文件变量配置允许上传文件,但预签名上传接口错误判断为未开启文件上传的问题。
{
"title": "4.15.x",
"description": "",
"pages": ["4156", "4155", "4154", "4153", "4152", "4151", "41500", "41507", "41506", "41505", "41504", "41503", "41502", "41501"]
"pages": ["4157", "4156", "4155", "4154", "4153", "4152", "4151", "41500", "41507", "41506", "41505", "41504", "41503", "41502", "41501"]
}
{
"title": "4.15.x",
"description": "",
"pages": ["4156", "4155", "4154", "4153", "4152", "4151", "41500", "41507", "41506", "41505", "41504", "41503", "41502", "41501"]
"pages": ["4157", "4156", "4155", "4154", "4153", "4152", "4151", "41500", "41507", "41506", "41505", "41504", "41503", "41502", "41501"]
}
---
title: 'V4.16.0-beta1 (In Progress)'
title: 'V4.16.0-beta1 (Environment Variable Changes and Upgrade Scripts)'
description: 'FastGPT V4.16.0-beta1 release notes'
---
......@@ -53,12 +53,11 @@ The E2B Sandbox Provider has been removed. Environments previously configured fo
### 3. Update images
To be added...
1. app
2. pro
3. agent-sandbox-volumn
4. agent-sandbox-proxy
- Update the fastgpt-app (FastGPT main service) image tag to `v4.16.0-beta1`
- Update the fastgpt-pro (FastGPT commercial edition) image tag to `v4.16.0-beta1`
- Update the fastgpt-plugin image tag to `v1.1.0-beta1`
- Update the agent-sandbox-volumn image tag to `v0.3.0-beta4` (for OpenSandbox only)
- Update the agent-sandbox-proxy image tag to `v0.3.0-beta4` (for Sandbox only)
### 4. Migrate Agent Sandbox data
......
---
title: 'V4.16.0-beta1(进行中)'
title: 'V4.16.0-beta1(环境变量变更、升级脚本)'
description: 'FastGPT V4.16.0-beta1 更新说明'
---
......@@ -53,12 +53,11 @@ E2B Sandbox Provider 已移除。此前配置过 E2B 的环境需要切换为 `o
### 3. 镜像更新
待补充……
1. app
2. pro
3. agent-sandbox-volumn
4. agent-sandbox-proxy
- 更新 fastgpt-app(fastgpt 主服务) 镜像 tag: v4.16.0-beta1
- 更新 fastgpt-pro(fastgpt 商业版) 镜像 tag: v4.16.0-beta1
- 更新 fastgpt-plugin 镜像 tag: v1.1.0-beta1
- 更新 agent-sandbox-volumn 镜像 tag: v0.3.0-beta4 (Opensandbox 专属)
- 更新 agent-sandbox-proxy 镜像 tag: v0.3.0-beta4 (沙盒专属)
### 4. 迁移 Agent Sandbox 数据
......
......@@ -93,7 +93,6 @@ description: FastGPT Toc
- [/en/self-host/config/model/siliconCloud](/en/self-host/config/model/siliconCloud)
- [/en/self-host/config/object-storage](/en/self-host/config/object-storage)
- [/en/self-host/config/remote-debug-suite](/en/self-host/config/remote-debug-suite)
- [/en/self-host/config/sandbox/common](/en/self-host/config/sandbox/common)
- [/en/self-host/config/sandbox/opensandbox](/en/self-host/config/sandbox/opensandbox)
- [/en/self-host/config/sandbox/sealosdevbox](/en/self-host/config/sandbox/sealosdevbox)
- [/en/self-host/config/signoz](/en/self-host/config/signoz)
......@@ -168,6 +167,7 @@ description: FastGPT Toc
- [/en/self-host/upgrading/4-15/4154](/en/self-host/upgrading/4-15/4154)
- [/en/self-host/upgrading/4-15/4155](/en/self-host/upgrading/4-15/4155)
- [/en/self-host/upgrading/4-15/4156](/en/self-host/upgrading/4-15/4156)
- [/en/self-host/upgrading/4-15/4157](/en/self-host/upgrading/4-15/4157)
- [/en/self-host/upgrading/4-16/41601](/en/self-host/upgrading/4-16/41601)
- [/en/self-host/upgrading/outdated/40](/en/self-host/upgrading/outdated/40)
- [/en/self-host/upgrading/outdated/41](/en/self-host/upgrading/outdated/41)
......
......@@ -93,7 +93,6 @@ description: FastGPT 文档目录
- [/self-host/config/model/siliconCloud](/self-host/config/model/siliconCloud)
- [/self-host/config/object-storage](/self-host/config/object-storage)
- [/self-host/config/remote-debug-suite](/self-host/config/remote-debug-suite)
- [/self-host/config/sandbox/common](/self-host/config/sandbox/common)
- [/self-host/config/sandbox/opensandbox](/self-host/config/sandbox/opensandbox)
- [/self-host/config/sandbox/sealosdevbox](/self-host/config/sandbox/sealosdevbox)
- [/self-host/config/signoz](/self-host/config/signoz)
......@@ -170,6 +169,7 @@ description: FastGPT 文档目录
- [/self-host/upgrading/4-15/4154](/self-host/upgrading/4-15/4154)
- [/self-host/upgrading/4-15/4155](/self-host/upgrading/4-15/4155)
- [/self-host/upgrading/4-15/4156](/self-host/upgrading/4-15/4156)
- [/self-host/upgrading/4-15/4157](/self-host/upgrading/4-15/4157)
- [/self-host/upgrading/4-16/41601](/self-host/upgrading/4-16/41601)
- [/self-host/upgrading/outdated/40](/self-host/upgrading/outdated/40)
- [/self-host/upgrading/outdated/41](/self-host/upgrading/outdated/41)
......
......@@ -169,8 +169,8 @@
"content/plugin/model-presets.mdx": "2026-06-04T16:10:15+08:00",
"content/plugin/system-tool-development.en.mdx": "2026-07-02T11:54:55+08:00",
"content/plugin/system-tool-development.mdx": "2026-07-02T11:54:55+08:00",
"content/self-host/config/env.en.mdx": "2026-08-05T00:04:49+08:00",
"content/self-host/config/env.mdx": "2026-08-05T00:04:49+08:00",
"content/self-host/config/env.en.mdx": "2026-08-05T22:45:40+08:00",
"content/self-host/config/env.mdx": "2026-08-05T22:45:40+08:00",
"content/self-host/config/model/intro.en.mdx": "2026-06-04T16:10:15+08:00",
"content/self-host/config/model/intro.mdx": "2026-06-04T16:10:15+08:00",
"content/self-host/config/model/minimax.en.mdx": "2026-06-03T10:40:17+08:00",
......@@ -181,8 +181,6 @@
"content/self-host/config/object-storage.mdx": "2026-07-26T21:56:28+08:00",
"content/self-host/config/remote-debug-suite.en.mdx": "2026-06-27T22:05:51+08:00",
"content/self-host/config/remote-debug-suite.mdx": "2026-06-27T22:05:51+08:00",
"content/self-host/config/sandbox/common.en.mdx": "2026-07-30T15:22:52+08:00",
"content/self-host/config/sandbox/common.mdx": "2026-07-30T15:22:52+08:00",
"content/self-host/config/sandbox/opensandbox.en.mdx": "2026-08-05T18:25:06+08:00",
"content/self-host/config/sandbox/opensandbox.mdx": "2026-08-05T18:25:06+08:00",
"content/self-host/config/sandbox/sealosdevbox.en.mdx": "2026-07-30T15:22:52+08:00",
......@@ -333,8 +331,10 @@
"content/self-host/upgrading/4-15/4155.mdx": "2026-07-30T11:22:58+08:00",
"content/self-host/upgrading/4-15/4156.en.mdx": "2026-07-31T17:46:31+08:00",
"content/self-host/upgrading/4-15/4156.mdx": "2026-07-31T17:46:31+08:00",
"content/self-host/upgrading/4-16/41601.en.mdx": "2026-08-05T19:17:13+08:00",
"content/self-host/upgrading/4-16/41601.mdx": "2026-08-05T19:17:13+08:00",
"content/self-host/upgrading/4-15/4157.en.mdx": "2026-08-07T10:52:25+08:00",
"content/self-host/upgrading/4-15/4157.mdx": "2026-08-07T10:52:25+08:00",
"content/self-host/upgrading/4-16/41601.en.mdx": "2026-08-07T10:36:08+08:00",
"content/self-host/upgrading/4-16/41601.mdx": "2026-08-07T10:36:08+08:00",
"content/self-host/upgrading/outdated/40.en.mdx": "2026-07-25T00:27:20+08:00",
"content/self-host/upgrading/outdated/40.mdx": "2026-07-25T00:27:20+08:00",
"content/self-host/upgrading/outdated/41.en.mdx": "2026-07-25T00:27:20+08:00",
......@@ -475,6 +475,6 @@
"content/self-host/upgrading/outdated/499.mdx": "2026-05-07T15:06:40+08:00",
"content/self-host/upgrading/upgrade-intruction.en.mdx": "2026-04-26T21:08:47+08:00",
"content/self-host/upgrading/upgrade-intruction.mdx": "2026-04-26T21:08:47+08:00",
"content/toc.en.mdx": "2026-08-04T22:08:29+08:00",
"content/toc.mdx": "2026-08-04T22:08:29+08:00"
"content/toc.en.mdx": "2026-08-07T10:52:25+08:00",
"content/toc.mdx": "2026-08-07T10:52:25+08:00"
}
\ No newline at end of file
......@@ -5,12 +5,22 @@
# root 默认密码(重启后会强制重置该密码成环境变量值)
x-default-root-psw: &x-default-root-psw '1234'
# FastGPT 前端访问地址,必须填写用户实际访问 FastGPT 的地址
x-fe-domain: &x-fe-domain ''
# Sandbox Proxy WebSocket 地址,必须填写用户实际访问地址
x-agent-sandbox-proxy-url: &x-agent-sandbox-proxy-url ''
# Sandbox Proxy HTTP 预览地址,必须填写用户实际访问地址
x-agent-sandbox-preview-proxy-url: &x-agent-sandbox-preview-proxy-url ''
# 系统最高密钥凭证
x-system-key: &x-system-key 'fastgpt-xxx'
# plugin auth token
x-plugin-auth-token: &x-plugin-auth-token 'token'
x-plugin-auth-token: &x-plugin-auth-token 'fastgpt_plugin_auth_token_32char'
# code sandbox token
x-code-sandbox-token: &x-code-sandbox-token 'codesandbox'
# agent sandbox proxy secret,必须与 FastGPT 主站环境变量保持一致,且至少 32 位
x-agent-sandbox-proxy-secret: &x-agent-sandbox-proxy-secret 'default_fastgpt_agent_sandbox_proxy_secret'
# volume manager token,必须与 FastGPT 主站环境变量保持一致
x-volume-manager-auth-token: &x-volume-manager-auth-token 'vmtoken'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
......@@ -39,8 +49,44 @@ x-log-config: &x-log-config
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
x-no-proxy-config: &x-no-proxy-config
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
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
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-agent-sandbox-proxy,fastgpt-opensandbox-server,fastgpt-volume-manager,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-agent-sandbox-proxy,fastgpt-opensandbox-server,fastgpt-volume-manager,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
# FastGPT 主服务的 Agent Sandbox 配置
x-agent-sandbox-config: &x-agent-sandbox-config
AGENT_SANDBOX_PROVIDER: opensandbox
AGENT_SANDBOX_PROXY_SECRET: *x-agent-sandbox-proxy-secret
# 浏览器访问 agent-sandbox-proxy 的 WebSocket 地址。
AGENT_SANDBOX_PROXY_URL: *x-agent-sandbox-proxy-url
# 浏览器访问 Sandbox 文件预览的 HTTP(S) 地址。
AGENT_SANDBOX_PREVIEW_PROXY_URL: *x-agent-sandbox-preview-proxy-url
# 沙盒规模大小
AGENT_SANDBOX_CPU_COUNT: 1
AGENT_SANDBOX_MEMORY_MIB: 2048
AGENT_SANDBOX_STORAGE_SIZE_GI: 1
# 不活跃判断阈值
AGENT_SANDBOX_SUSPEND_MINUTES: 60
# 长期不活跃判断阈值
AGENT_SANDBOX_ARCHIVE_INACTIVE_DAYS: 7
AGENT_SANDBOX_WS_MAX_MESSAGE_BYTES: 67108864
AGENT_SANDBOX_WS_MAX_FRAME_BYTES: 16777216
# 自定义 npm/pip 源
AGENT_SANDBOX_NPM_REGISTRY:
AGENT_SANDBOX_PYPI_INDEX_URL:
# Opensandox 配置
AGENT_SANDBOX_OPENSANDBOX_BASEURL: http://fastgpt-opensandbox-server:8090
AGENT_SANDBOX_OPENSANDBOX_API_KEY: fastgpt-opensandbox-api-key
AGENT_SANDBOX_OPENSANDBOX_RUNTIME: docker
AGENT_SANDBOX_OPENSANDBOX_IMAGE: ghcr.io/labring/fastgpt-agent-sandbox:v0.3.0-beta4
AGENT_SANDBOX_OPENSANDBOX_USE_SERVER_PROXY: true
AGENT_SANDBOX_OPENSANDBOX_VOLUME_MANAGER_URL: http://fastgpt-volume-manager:3000
AGENT_SANDBOX_OPENSANDBOX_VOLUME_MANAGER_TOKEN: *x-volume-manager-auth-token
AGENT_SANDBOX_OPENSANDBOX_VOLUME_NAME_PREFIX: fastgpt-session
# Sealos devbox 配置
AGENT_SANDBOX_SEALOS_BASEURL:
AGENT_SANDBOX_SEALOS_TOKEN:
AGENT_SANDBOX_SEALOS_WORK_DIRECTORY: /home/devbox/workspace
AGENT_SANDBOX_SEALOS_IMAGE:
# 向量库相关配置
x-vec-config: &x-vec-config
......@@ -192,7 +238,7 @@ services:
fastgpt-app:
container_name: fastgpt-app
image: ghcr.io/labring/fastgpt:v4.15.4
image: ghcr.io/labring/fastgpt:v4.16.0-beta1
ports:
- 3000:3000
networks:
......@@ -216,11 +262,11 @@ services:
restart: always
environment:
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
<<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
<<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config, *x-agent-sandbox-config]
HOSTNAME: 0.0.0.0
# ==================== 基础配置 ====================
# 必填。客户端访问 FastGPT 时使用的地址,由协议、主机和可选端口组成,用于补全文件资源路径。例如 https://fastgpt.cn;本地开发可使用 http://localhost:3000。
FE_DOMAIN:
FE_DOMAIN: *x-fe-domain
# root key(最高权限)
ROOT_KEY: *x-system-key
# root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。
......@@ -251,11 +297,9 @@ services:
AIPROXY_API_ENDPOINT: http://fastgpt-aiproxy:3000
# AI Proxy 的 Admin Token,与 AI Proxy 中的环境变量 ADMIN_KEY
AIPROXY_API_TOKEN: *x-aiproxy-token
PASSWORD_LOGIN_MINUTE_LIMIT_COUNT:
# MCP Server 代理地址,用于 MCP 使用方式页拼接 SSE 地址
SSE_MCP_SERVER_PROXY_ENDPOINT:
# 官网访客归因 CRM;地址需包含 /api/v1,为空时不进行身份上报
CRM_API_URL:
CRM_API_KEY:
# ==================== 日志与监控 ====================
# 传递给 OTLP 收集器的服务名称
......@@ -288,7 +332,7 @@ services:
TEXTIN_SECRET_CODE:
fastgpt-code-sandbox:
container_name: fastgpt-code-sandbox
image: ghcr.io/labring/fastgpt-code-sandbox:v4.15.4
image: ghcr.io/labring/fastgpt-code-sandbox:v4.15.6
networks:
- codesandbox
restart: always
......@@ -352,7 +396,7 @@ services:
<<: [*x-log-config, *x-no-proxy-config]
FASTGPT_ENDPOINT: http://fastgpt-app:3000
fastgpt-plugin:
image: ghcr.io/labring/fastgpt-plugin:v1.0.2
image: ghcr.io/labring/fastgpt-plugin:v1.1.0-beta1
container_name: fastgpt-plugin
restart: always
networks:
......@@ -378,6 +422,90 @@ services:
timeout: 20s
retries: 3
# OpenSandbox Server 和 Volume Manager 仅需在 app 内网中访问。
fastgpt-opensandbox-server:
image: opensandbox/server:v0.2.1
container_name: fastgpt-opensandbox-server
restart: always
networks:
- app
volumes:
- /var/run/docker.sock:/var/run/docker.sock
configs:
- source: opensandbox-config
target: /etc/opensandbox/config.toml
environment:
<<: [*x-no-proxy-config]
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck:
test:
[
'CMD',
'python',
'-c',
"import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://localhost:8090/health',timeout=3).status==200 else 1)"
]
interval: 10s
timeout: 5s
retries: 5
fastgpt-volume-manager:
image: ghcr.io/labring/fastgpt-agent-volume-manager:v0.3.0-beta4
container_name: fastgpt-volume-manager
restart: always
networks:
- app
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
<<: [*x-no-proxy-config]
PORT: 3000
VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token
VM_LOG_LEVEL: info
healthcheck:
test:
[
'CMD',
'node',
'-e',
"fetch('http://localhost:3000/health').then((res) => { if (!res.ok) process.exit(1); }).catch(() => process.exit(1));"
]
interval: 10s
timeout: 5s
retries: 5
# 仅用于预拉取运行时镜像,不会随 docker compose up 启动。
opensandbox-agent-sandbox-image:
image: ghcr.io/labring/fastgpt-agent-sandbox:v0.3.0-beta4
profiles:
- prepull
opensandbox-execd-image:
image: opensandbox/execd:v1.0.21
profiles:
- prepull
opensandbox-egress-image:
image: opensandbox/egress:v1.1.4
profiles:
- prepull
# 浏览器访问 Agent Sandbox 的鉴权代理,生产环境应通过独立域名反向代理 3006 端口。
fastgpt-agent-sandbox-proxy:
image: ghcr.io/labring/fastgpt-agent-sandbox-proxy:v0.3.0-beta4
container_name: fastgpt-agent-sandbox-proxy
restart: always
networks:
- app
ports:
- 3006:1006
environment:
<<: [*x-no-proxy-config]
PORT: 1006
AGENT_SANDBOX_PROXY_SECRET: *x-agent-sandbox-proxy-secret
FASTGPT_APP_URL: http://fastgpt-app:3000
FASTGPT_APP_REQUEST_TIMEOUT_SECS: 60
RUST_LOG: info,fastgpt_agent_sandbox_proxy=debug
# AI Proxy
fastgpt-aiproxy:
image: ghcr.io/labring/aiproxy:v0.6.5
......@@ -449,3 +577,26 @@ volumes:
fastgpt-seekdb-data:
fastgpt-seekdb-config:
fastgpt-aiproxy_pg:
configs:
opensandbox-config:
content: |
[server]
host = "0.0.0.0"
port = 8090
api_key = "fastgpt-opensandbox-api-key"
log_level = "INFO"
[runtime]
type = "docker"
execd_image = "opensandbox/execd:v1.0.21"
[egress]
image = "opensandbox/egress:v1.1.4"
[docker]
network_mode = "bridge"
host_ip = "host.docker.internal"
[ingress]
mode = "direct"
......@@ -5,12 +5,22 @@
# root 默认密码(重启后会强制重置该密码成环境变量值)
x-default-root-psw: &x-default-root-psw '1234'
# FastGPT 前端访问地址,必须填写用户实际访问 FastGPT 的地址
x-fe-domain: &x-fe-domain ''
# Sandbox Proxy WebSocket 地址,必须填写用户实际访问地址
x-agent-sandbox-proxy-url: &x-agent-sandbox-proxy-url ''
# Sandbox Proxy HTTP 预览地址,必须填写用户实际访问地址
x-agent-sandbox-preview-proxy-url: &x-agent-sandbox-preview-proxy-url ''
# 系统最高密钥凭证
x-system-key: &x-system-key 'fastgpt-xxx'
# plugin auth token
x-plugin-auth-token: &x-plugin-auth-token 'token'
x-plugin-auth-token: &x-plugin-auth-token 'fastgpt_plugin_auth_token_32char'
# code sandbox token
x-code-sandbox-token: &x-code-sandbox-token 'codesandbox'
# agent sandbox proxy secret,必须与 FastGPT 主站环境变量保持一致,且至少 32 位
x-agent-sandbox-proxy-secret: &x-agent-sandbox-proxy-secret 'default_fastgpt_agent_sandbox_proxy_secret'
# volume manager token,必须与 FastGPT 主站环境变量保持一致
x-volume-manager-auth-token: &x-volume-manager-auth-token 'vmtoken'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
......@@ -39,8 +49,44 @@ x-log-config: &x-log-config
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
x-no-proxy-config: &x-no-proxy-config
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
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
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-agent-sandbox-proxy,fastgpt-opensandbox-server,fastgpt-volume-manager,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-agent-sandbox-proxy,fastgpt-opensandbox-server,fastgpt-volume-manager,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
# FastGPT 主服务的 Agent Sandbox 配置
x-agent-sandbox-config: &x-agent-sandbox-config
AGENT_SANDBOX_PROVIDER: opensandbox
AGENT_SANDBOX_PROXY_SECRET: *x-agent-sandbox-proxy-secret
# 浏览器访问 agent-sandbox-proxy 的 WebSocket 地址。
AGENT_SANDBOX_PROXY_URL: *x-agent-sandbox-proxy-url
# 浏览器访问 Sandbox 文件预览的 HTTP(S) 地址。
AGENT_SANDBOX_PREVIEW_PROXY_URL: *x-agent-sandbox-preview-proxy-url
# 沙盒规模大小
AGENT_SANDBOX_CPU_COUNT: 1
AGENT_SANDBOX_MEMORY_MIB: 2048
AGENT_SANDBOX_STORAGE_SIZE_GI: 1
# 不活跃判断阈值
AGENT_SANDBOX_SUSPEND_MINUTES: 60
# 长期不活跃判断阈值
AGENT_SANDBOX_ARCHIVE_INACTIVE_DAYS: 7
AGENT_SANDBOX_WS_MAX_MESSAGE_BYTES: 67108864
AGENT_SANDBOX_WS_MAX_FRAME_BYTES: 16777216
# 自定义 npm/pip 源
AGENT_SANDBOX_NPM_REGISTRY:
AGENT_SANDBOX_PYPI_INDEX_URL:
# Opensandox 配置
AGENT_SANDBOX_OPENSANDBOX_BASEURL: http://fastgpt-opensandbox-server:8090
AGENT_SANDBOX_OPENSANDBOX_API_KEY: fastgpt-opensandbox-api-key
AGENT_SANDBOX_OPENSANDBOX_RUNTIME: docker
AGENT_SANDBOX_OPENSANDBOX_IMAGE: ghcr.io/labring/fastgpt-agent-sandbox:v0.3.0-beta4
AGENT_SANDBOX_OPENSANDBOX_USE_SERVER_PROXY: true
AGENT_SANDBOX_OPENSANDBOX_VOLUME_MANAGER_URL: http://fastgpt-volume-manager:3000
AGENT_SANDBOX_OPENSANDBOX_VOLUME_MANAGER_TOKEN: *x-volume-manager-auth-token
AGENT_SANDBOX_OPENSANDBOX_VOLUME_NAME_PREFIX: fastgpt-session
# Sealos devbox 配置
AGENT_SANDBOX_SEALOS_BASEURL:
AGENT_SANDBOX_SEALOS_TOKEN:
AGENT_SANDBOX_SEALOS_WORK_DIRECTORY: /home/devbox/workspace
AGENT_SANDBOX_SEALOS_IMAGE:
# 向量库相关配置
x-vec-config: &x-vec-config
......@@ -170,7 +216,7 @@ services:
fastgpt-app:
container_name: fastgpt-app
image: ghcr.io/labring/fastgpt:v4.15.4
image: ghcr.io/labring/fastgpt:v4.16.0-beta1
ports:
- 3000:3000
networks:
......@@ -194,11 +240,11 @@ services:
restart: always
environment:
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
<<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
<<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config, *x-agent-sandbox-config]
HOSTNAME: 0.0.0.0
# ==================== 基础配置 ====================
# 必填。客户端访问 FastGPT 时使用的地址,由协议、主机和可选端口组成,用于补全文件资源路径。例如 https://fastgpt.cn;本地开发可使用 http://localhost:3000。
FE_DOMAIN:
FE_DOMAIN: *x-fe-domain
# root key(最高权限)
ROOT_KEY: *x-system-key
# root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。
......@@ -229,11 +275,9 @@ services:
AIPROXY_API_ENDPOINT: http://fastgpt-aiproxy:3000
# AI Proxy 的 Admin Token,与 AI Proxy 中的环境变量 ADMIN_KEY
AIPROXY_API_TOKEN: *x-aiproxy-token
PASSWORD_LOGIN_MINUTE_LIMIT_COUNT:
# MCP Server 代理地址,用于 MCP 使用方式页拼接 SSE 地址
SSE_MCP_SERVER_PROXY_ENDPOINT:
# 官网访客归因 CRM;地址需包含 /api/v1,为空时不进行身份上报
CRM_API_URL:
CRM_API_KEY:
# ==================== 日志与监控 ====================
# 传递给 OTLP 收集器的服务名称
......@@ -266,7 +310,7 @@ services:
TEXTIN_SECRET_CODE:
fastgpt-code-sandbox:
container_name: fastgpt-code-sandbox
image: ghcr.io/labring/fastgpt-code-sandbox:v4.15.4
image: ghcr.io/labring/fastgpt-code-sandbox:v4.15.6
networks:
- codesandbox
restart: always
......@@ -330,7 +374,7 @@ services:
<<: [*x-log-config, *x-no-proxy-config]
FASTGPT_ENDPOINT: http://fastgpt-app:3000
fastgpt-plugin:
image: ghcr.io/labring/fastgpt-plugin:v1.0.2
image: ghcr.io/labring/fastgpt-plugin:v1.1.0-beta1
container_name: fastgpt-plugin
restart: always
networks:
......@@ -356,6 +400,90 @@ services:
timeout: 20s
retries: 3
# OpenSandbox Server 和 Volume Manager 仅需在 app 内网中访问。
fastgpt-opensandbox-server:
image: opensandbox/server:v0.2.1
container_name: fastgpt-opensandbox-server
restart: always
networks:
- app
volumes:
- /var/run/docker.sock:/var/run/docker.sock
configs:
- source: opensandbox-config
target: /etc/opensandbox/config.toml
environment:
<<: [*x-no-proxy-config]
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck:
test:
[
'CMD',
'python',
'-c',
"import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://localhost:8090/health',timeout=3).status==200 else 1)"
]
interval: 10s
timeout: 5s
retries: 5
fastgpt-volume-manager:
image: ghcr.io/labring/fastgpt-agent-volume-manager:v0.3.0-beta4
container_name: fastgpt-volume-manager
restart: always
networks:
- app
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
<<: [*x-no-proxy-config]
PORT: 3000
VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token
VM_LOG_LEVEL: info
healthcheck:
test:
[
'CMD',
'node',
'-e',
"fetch('http://localhost:3000/health').then((res) => { if (!res.ok) process.exit(1); }).catch(() => process.exit(1));"
]
interval: 10s
timeout: 5s
retries: 5
# 仅用于预拉取运行时镜像,不会随 docker compose up 启动。
opensandbox-agent-sandbox-image:
image: ghcr.io/labring/fastgpt-agent-sandbox:v0.3.0-beta4
profiles:
- prepull
opensandbox-execd-image:
image: opensandbox/execd:v1.0.21
profiles:
- prepull
opensandbox-egress-image:
image: opensandbox/egress:v1.1.4
profiles:
- prepull
# 浏览器访问 Agent Sandbox 的鉴权代理,生产环境应通过独立域名反向代理 3006 端口。
fastgpt-agent-sandbox-proxy:
image: ghcr.io/labring/fastgpt-agent-sandbox-proxy:v0.3.0-beta4
container_name: fastgpt-agent-sandbox-proxy
restart: always
networks:
- app
ports:
- 3006:1006
environment:
<<: [*x-no-proxy-config]
PORT: 1006
AGENT_SANDBOX_PROXY_SECRET: *x-agent-sandbox-proxy-secret
FASTGPT_APP_URL: http://fastgpt-app:3000
FASTGPT_APP_REQUEST_TIMEOUT_SECS: 60
RUST_LOG: info,fastgpt_agent_sandbox_proxy=debug
# AI Proxy
fastgpt-aiproxy:
image: ghcr.io/labring/aiproxy:v0.6.5
......@@ -429,6 +557,27 @@ volumes:
fastgpt-aiproxy_pg:
configs:
opensandbox-config:
content: |
[server]
host = "0.0.0.0"
port = 8090
api_key = "fastgpt-opensandbox-api-key"
log_level = "INFO"
[runtime]
type = "docker"
execd_image = "opensandbox/execd:v1.0.21"
[egress]
image = "opensandbox/egress:v1.1.4"
[docker]
network_mode = "bridge"
host_ip = "host.docker.internal"
[ingress]
mode = "direct"
init_sql:
name: init_sql
content: |
......
......@@ -5,12 +5,22 @@
# root 默认密码(重启后会强制重置该密码成环境变量值)
x-default-root-psw: &x-default-root-psw '1234'
# FastGPT 前端访问地址,必须填写用户实际访问 FastGPT 的地址
x-fe-domain: &x-fe-domain ''
# Sandbox Proxy WebSocket 地址,必须填写用户实际访问地址
x-agent-sandbox-proxy-url: &x-agent-sandbox-proxy-url ''
# Sandbox Proxy HTTP 预览地址,必须填写用户实际访问地址
x-agent-sandbox-preview-proxy-url: &x-agent-sandbox-preview-proxy-url ''
# 系统最高密钥凭证
x-system-key: &x-system-key 'fastgpt-xxx'
# plugin auth token
x-plugin-auth-token: &x-plugin-auth-token 'token'
x-plugin-auth-token: &x-plugin-auth-token 'fastgpt_plugin_auth_token_32char'
# code sandbox token
x-code-sandbox-token: &x-code-sandbox-token 'codesandbox'
# agent sandbox proxy secret,必须与 FastGPT 主站环境变量保持一致,且至少 32 位
x-agent-sandbox-proxy-secret: &x-agent-sandbox-proxy-secret 'default_fastgpt_agent_sandbox_proxy_secret'
# volume manager token,必须与 FastGPT 主站环境变量保持一致
x-volume-manager-auth-token: &x-volume-manager-auth-token 'vmtoken'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
......@@ -39,8 +49,44 @@ x-log-config: &x-log-config
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
x-no-proxy-config: &x-no-proxy-config
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
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
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-agent-sandbox-proxy,fastgpt-opensandbox-server,fastgpt-volume-manager,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-agent-sandbox-proxy,fastgpt-opensandbox-server,fastgpt-volume-manager,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
# FastGPT 主服务的 Agent Sandbox 配置
x-agent-sandbox-config: &x-agent-sandbox-config
AGENT_SANDBOX_PROVIDER: opensandbox
AGENT_SANDBOX_PROXY_SECRET: *x-agent-sandbox-proxy-secret
# 浏览器访问 agent-sandbox-proxy 的 WebSocket 地址。
AGENT_SANDBOX_PROXY_URL: *x-agent-sandbox-proxy-url
# 浏览器访问 Sandbox 文件预览的 HTTP(S) 地址。
AGENT_SANDBOX_PREVIEW_PROXY_URL: *x-agent-sandbox-preview-proxy-url
# 沙盒规模大小
AGENT_SANDBOX_CPU_COUNT: 1
AGENT_SANDBOX_MEMORY_MIB: 2048
AGENT_SANDBOX_STORAGE_SIZE_GI: 1
# 不活跃判断阈值
AGENT_SANDBOX_SUSPEND_MINUTES: 60
# 长期不活跃判断阈值
AGENT_SANDBOX_ARCHIVE_INACTIVE_DAYS: 7
AGENT_SANDBOX_WS_MAX_MESSAGE_BYTES: 67108864
AGENT_SANDBOX_WS_MAX_FRAME_BYTES: 16777216
# 自定义 npm/pip 源
AGENT_SANDBOX_NPM_REGISTRY:
AGENT_SANDBOX_PYPI_INDEX_URL:
# Opensandox 配置
AGENT_SANDBOX_OPENSANDBOX_BASEURL: http://fastgpt-opensandbox-server:8090
AGENT_SANDBOX_OPENSANDBOX_API_KEY: fastgpt-opensandbox-api-key
AGENT_SANDBOX_OPENSANDBOX_RUNTIME: docker
AGENT_SANDBOX_OPENSANDBOX_IMAGE: ghcr.io/labring/fastgpt-agent-sandbox:v0.3.0-beta4
AGENT_SANDBOX_OPENSANDBOX_USE_SERVER_PROXY: true
AGENT_SANDBOX_OPENSANDBOX_VOLUME_MANAGER_URL: http://fastgpt-volume-manager:3000
AGENT_SANDBOX_OPENSANDBOX_VOLUME_MANAGER_TOKEN: *x-volume-manager-auth-token
AGENT_SANDBOX_OPENSANDBOX_VOLUME_NAME_PREFIX: fastgpt-session
# Sealos devbox 配置
AGENT_SANDBOX_SEALOS_BASEURL:
AGENT_SANDBOX_SEALOS_TOKEN:
AGENT_SANDBOX_SEALOS_WORK_DIRECTORY: /home/devbox/workspace
AGENT_SANDBOX_SEALOS_IMAGE:
# 向量库相关配置
x-vec-config: &x-vec-config
......@@ -154,7 +200,7 @@ services:
fastgpt-app:
container_name: fastgpt-app
image: ghcr.io/labring/fastgpt:v4.15.4
image: ghcr.io/labring/fastgpt:v4.16.0-beta1
ports:
- 3000:3000
networks:
......@@ -178,11 +224,11 @@ services:
restart: always
environment:
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
<<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
<<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config, *x-agent-sandbox-config]
HOSTNAME: 0.0.0.0
# ==================== 基础配置 ====================
# 必填。客户端访问 FastGPT 时使用的地址,由协议、主机和可选端口组成,用于补全文件资源路径。例如 https://fastgpt.cn;本地开发可使用 http://localhost:3000。
FE_DOMAIN:
FE_DOMAIN: *x-fe-domain
# root key(最高权限)
ROOT_KEY: *x-system-key
# root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。
......@@ -213,11 +259,9 @@ services:
AIPROXY_API_ENDPOINT: http://fastgpt-aiproxy:3000
# AI Proxy 的 Admin Token,与 AI Proxy 中的环境变量 ADMIN_KEY
AIPROXY_API_TOKEN: *x-aiproxy-token
PASSWORD_LOGIN_MINUTE_LIMIT_COUNT:
# MCP Server 代理地址,用于 MCP 使用方式页拼接 SSE 地址
SSE_MCP_SERVER_PROXY_ENDPOINT:
# 官网访客归因 CRM;地址需包含 /api/v1,为空时不进行身份上报
CRM_API_URL:
CRM_API_KEY:
# ==================== 日志与监控 ====================
# 传递给 OTLP 收集器的服务名称
......@@ -250,7 +294,7 @@ services:
TEXTIN_SECRET_CODE:
fastgpt-code-sandbox:
container_name: fastgpt-code-sandbox
image: ghcr.io/labring/fastgpt-code-sandbox:v4.15.4
image: ghcr.io/labring/fastgpt-code-sandbox:v4.15.6
networks:
- codesandbox
restart: always
......@@ -314,7 +358,7 @@ services:
<<: [*x-log-config, *x-no-proxy-config]
FASTGPT_ENDPOINT: http://fastgpt-app:3000
fastgpt-plugin:
image: ghcr.io/labring/fastgpt-plugin:v1.0.2
image: ghcr.io/labring/fastgpt-plugin:v1.1.0-beta1
container_name: fastgpt-plugin
restart: always
networks:
......@@ -340,6 +384,90 @@ services:
timeout: 20s
retries: 3
# OpenSandbox Server 和 Volume Manager 仅需在 app 内网中访问。
fastgpt-opensandbox-server:
image: opensandbox/server:v0.2.1
container_name: fastgpt-opensandbox-server
restart: always
networks:
- app
volumes:
- /var/run/docker.sock:/var/run/docker.sock
configs:
- source: opensandbox-config
target: /etc/opensandbox/config.toml
environment:
<<: [*x-no-proxy-config]
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck:
test:
[
'CMD',
'python',
'-c',
"import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://localhost:8090/health',timeout=3).status==200 else 1)"
]
interval: 10s
timeout: 5s
retries: 5
fastgpt-volume-manager:
image: ghcr.io/labring/fastgpt-agent-volume-manager:v0.3.0-beta4
container_name: fastgpt-volume-manager
restart: always
networks:
- app
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
<<: [*x-no-proxy-config]
PORT: 3000
VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token
VM_LOG_LEVEL: info
healthcheck:
test:
[
'CMD',
'node',
'-e',
"fetch('http://localhost:3000/health').then((res) => { if (!res.ok) process.exit(1); }).catch(() => process.exit(1));"
]
interval: 10s
timeout: 5s
retries: 5
# 仅用于预拉取运行时镜像,不会随 docker compose up 启动。
opensandbox-agent-sandbox-image:
image: ghcr.io/labring/fastgpt-agent-sandbox:v0.3.0-beta4
profiles:
- prepull
opensandbox-execd-image:
image: opensandbox/execd:v1.0.21
profiles:
- prepull
opensandbox-egress-image:
image: opensandbox/egress:v1.1.4
profiles:
- prepull
# 浏览器访问 Agent Sandbox 的鉴权代理,生产环境应通过独立域名反向代理 3006 端口。
fastgpt-agent-sandbox-proxy:
image: ghcr.io/labring/fastgpt-agent-sandbox-proxy:v0.3.0-beta4
container_name: fastgpt-agent-sandbox-proxy
restart: always
networks:
- app
ports:
- 3006:1006
environment:
<<: [*x-no-proxy-config]
PORT: 1006
AGENT_SANDBOX_PROXY_SECRET: *x-agent-sandbox-proxy-secret
FASTGPT_APP_URL: http://fastgpt-app:3000
FASTGPT_APP_REQUEST_TIMEOUT_SECS: 60
RUST_LOG: info,fastgpt_agent_sandbox_proxy=debug
# AI Proxy
fastgpt-aiproxy:
image: ghcr.io/labring/aiproxy:v0.6.5
......@@ -411,3 +539,26 @@ volumes:
fastgpt-seekdb-data:
fastgpt-seekdb-config:
fastgpt-aiproxy_pg:
configs:
opensandbox-config:
content: |
[server]
host = "0.0.0.0"
port = 8090
api_key = "fastgpt-opensandbox-api-key"
log_level = "INFO"
[runtime]
type = "docker"
execd_image = "opensandbox/execd:v1.0.21"
[egress]
image = "opensandbox/egress:v1.1.4"
[docker]
network_mode = "bridge"
host_ip = "host.docker.internal"
[ingress]
mode = "direct"
......@@ -5,12 +5,22 @@
# root 默认密码(重启后会强制重置该密码成环境变量值)
x-default-root-psw: &x-default-root-psw '1234'
# FastGPT 前端访问地址,必须填写用户实际访问 FastGPT 的地址
x-fe-domain: &x-fe-domain ''
# Sandbox Proxy WebSocket 地址,必须填写用户实际访问地址
x-agent-sandbox-proxy-url: &x-agent-sandbox-proxy-url ''
# Sandbox Proxy HTTP 预览地址,必须填写用户实际访问地址
x-agent-sandbox-preview-proxy-url: &x-agent-sandbox-preview-proxy-url ''
# 系统最高密钥凭证
x-system-key: &x-system-key 'fastgpt-xxx'
# plugin auth token
x-plugin-auth-token: &x-plugin-auth-token 'token'
x-plugin-auth-token: &x-plugin-auth-token 'fastgpt_plugin_auth_token_32char'
# code sandbox token
x-code-sandbox-token: &x-code-sandbox-token 'codesandbox'
# agent sandbox proxy secret,必须与 FastGPT 主站环境变量保持一致,且至少 32 位
x-agent-sandbox-proxy-secret: &x-agent-sandbox-proxy-secret 'default_fastgpt_agent_sandbox_proxy_secret'
# volume manager token,必须与 FastGPT 主站环境变量保持一致
x-volume-manager-auth-token: &x-volume-manager-auth-token 'vmtoken'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
......@@ -39,8 +49,44 @@ x-log-config: &x-log-config
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
x-no-proxy-config: &x-no-proxy-config
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
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
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-agent-sandbox-proxy,fastgpt-opensandbox-server,fastgpt-volume-manager,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-agent-sandbox-proxy,fastgpt-opensandbox-server,fastgpt-volume-manager,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
# FastGPT 主服务的 Agent Sandbox 配置
x-agent-sandbox-config: &x-agent-sandbox-config
AGENT_SANDBOX_PROVIDER: opensandbox
AGENT_SANDBOX_PROXY_SECRET: *x-agent-sandbox-proxy-secret
# 浏览器访问 agent-sandbox-proxy 的 WebSocket 地址。
AGENT_SANDBOX_PROXY_URL: *x-agent-sandbox-proxy-url
# 浏览器访问 Sandbox 文件预览的 HTTP(S) 地址。
AGENT_SANDBOX_PREVIEW_PROXY_URL: *x-agent-sandbox-preview-proxy-url
# 沙盒规模大小
AGENT_SANDBOX_CPU_COUNT: 1
AGENT_SANDBOX_MEMORY_MIB: 2048
AGENT_SANDBOX_STORAGE_SIZE_GI: 1
# 不活跃判断阈值
AGENT_SANDBOX_SUSPEND_MINUTES: 60
# 长期不活跃判断阈值
AGENT_SANDBOX_ARCHIVE_INACTIVE_DAYS: 7
AGENT_SANDBOX_WS_MAX_MESSAGE_BYTES: 67108864
AGENT_SANDBOX_WS_MAX_FRAME_BYTES: 16777216
# 自定义 npm/pip 源
AGENT_SANDBOX_NPM_REGISTRY:
AGENT_SANDBOX_PYPI_INDEX_URL:
# Opensandox 配置
AGENT_SANDBOX_OPENSANDBOX_BASEURL: http://fastgpt-opensandbox-server:8090
AGENT_SANDBOX_OPENSANDBOX_API_KEY: fastgpt-opensandbox-api-key
AGENT_SANDBOX_OPENSANDBOX_RUNTIME: docker
AGENT_SANDBOX_OPENSANDBOX_IMAGE: ghcr.io/labring/fastgpt-agent-sandbox:v0.3.0-beta4
AGENT_SANDBOX_OPENSANDBOX_USE_SERVER_PROXY: true
AGENT_SANDBOX_OPENSANDBOX_VOLUME_MANAGER_URL: http://fastgpt-volume-manager:3000
AGENT_SANDBOX_OPENSANDBOX_VOLUME_MANAGER_TOKEN: *x-volume-manager-auth-token
AGENT_SANDBOX_OPENSANDBOX_VOLUME_NAME_PREFIX: fastgpt-session
# Sealos devbox 配置
AGENT_SANDBOX_SEALOS_BASEURL:
AGENT_SANDBOX_SEALOS_TOKEN:
AGENT_SANDBOX_SEALOS_WORK_DIRECTORY: /home/devbox/workspace
AGENT_SANDBOX_SEALOS_IMAGE:
# 向量库相关配置
x-vec-config: &x-vec-config
......@@ -152,7 +198,7 @@ services:
fastgpt-app:
container_name: fastgpt-app
image: ghcr.io/labring/fastgpt:v4.15.4
image: ghcr.io/labring/fastgpt:v4.16.0-beta1
ports:
- 3000:3000
networks:
......@@ -176,11 +222,11 @@ services:
restart: always
environment:
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
<<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
<<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config, *x-agent-sandbox-config]
HOSTNAME: 0.0.0.0
# ==================== 基础配置 ====================
# 必填。客户端访问 FastGPT 时使用的地址,由协议、主机和可选端口组成,用于补全文件资源路径。例如 https://fastgpt.cn;本地开发可使用 http://localhost:3000。
FE_DOMAIN:
FE_DOMAIN: *x-fe-domain
# root key(最高权限)
ROOT_KEY: *x-system-key
# root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。
......@@ -211,11 +257,9 @@ services:
AIPROXY_API_ENDPOINT: http://fastgpt-aiproxy:3000
# AI Proxy 的 Admin Token,与 AI Proxy 中的环境变量 ADMIN_KEY
AIPROXY_API_TOKEN: *x-aiproxy-token
PASSWORD_LOGIN_MINUTE_LIMIT_COUNT:
# MCP Server 代理地址,用于 MCP 使用方式页拼接 SSE 地址
SSE_MCP_SERVER_PROXY_ENDPOINT:
# 官网访客归因 CRM;地址需包含 /api/v1,为空时不进行身份上报
CRM_API_URL:
CRM_API_KEY:
# ==================== 日志与监控 ====================
# 传递给 OTLP 收集器的服务名称
......@@ -248,7 +292,7 @@ services:
TEXTIN_SECRET_CODE:
fastgpt-code-sandbox:
container_name: fastgpt-code-sandbox
image: ghcr.io/labring/fastgpt-code-sandbox:v4.15.4
image: ghcr.io/labring/fastgpt-code-sandbox:v4.15.6
networks:
- codesandbox
restart: always
......@@ -312,7 +356,7 @@ services:
<<: [*x-log-config, *x-no-proxy-config]
FASTGPT_ENDPOINT: http://fastgpt-app:3000
fastgpt-plugin:
image: ghcr.io/labring/fastgpt-plugin:v1.0.2
image: ghcr.io/labring/fastgpt-plugin:v1.1.0-beta1
container_name: fastgpt-plugin
restart: always
networks:
......@@ -338,6 +382,90 @@ services:
timeout: 20s
retries: 3
# OpenSandbox Server 和 Volume Manager 仅需在 app 内网中访问。
fastgpt-opensandbox-server:
image: opensandbox/server:v0.2.1
container_name: fastgpt-opensandbox-server
restart: always
networks:
- app
volumes:
- /var/run/docker.sock:/var/run/docker.sock
configs:
- source: opensandbox-config
target: /etc/opensandbox/config.toml
environment:
<<: [*x-no-proxy-config]
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck:
test:
[
'CMD',
'python',
'-c',
"import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://localhost:8090/health',timeout=3).status==200 else 1)"
]
interval: 10s
timeout: 5s
retries: 5
fastgpt-volume-manager:
image: ghcr.io/labring/fastgpt-agent-volume-manager:v0.3.0-beta4
container_name: fastgpt-volume-manager
restart: always
networks:
- app
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
<<: [*x-no-proxy-config]
PORT: 3000
VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token
VM_LOG_LEVEL: info
healthcheck:
test:
[
'CMD',
'node',
'-e',
"fetch('http://localhost:3000/health').then((res) => { if (!res.ok) process.exit(1); }).catch(() => process.exit(1));"
]
interval: 10s
timeout: 5s
retries: 5
# 仅用于预拉取运行时镜像,不会随 docker compose up 启动。
opensandbox-agent-sandbox-image:
image: ghcr.io/labring/fastgpt-agent-sandbox:v0.3.0-beta4
profiles:
- prepull
opensandbox-execd-image:
image: opensandbox/execd:v1.0.21
profiles:
- prepull
opensandbox-egress-image:
image: opensandbox/egress:v1.1.4
profiles:
- prepull
# 浏览器访问 Agent Sandbox 的鉴权代理,生产环境应通过独立域名反向代理 3006 端口。
fastgpt-agent-sandbox-proxy:
image: ghcr.io/labring/fastgpt-agent-sandbox-proxy:v0.3.0-beta4
container_name: fastgpt-agent-sandbox-proxy
restart: always
networks:
- app
ports:
- 3006:1006
environment:
<<: [*x-no-proxy-config]
PORT: 1006
AGENT_SANDBOX_PROXY_SECRET: *x-agent-sandbox-proxy-secret
FASTGPT_APP_URL: http://fastgpt-app:3000
FASTGPT_APP_REQUEST_TIMEOUT_SECS: 60
RUST_LOG: info,fastgpt_agent_sandbox_proxy=debug
# AI Proxy
fastgpt-aiproxy:
image: ghcr.io/labring/aiproxy:v0.6.5
......@@ -409,3 +537,26 @@ volumes:
fastgpt-seekdb-data:
fastgpt-seekdb-config:
fastgpt-aiproxy_pg:
configs:
opensandbox-config:
content: |
[server]
host = "0.0.0.0"
port = 8090
api_key = "fastgpt-opensandbox-api-key"
log_level = "INFO"
[runtime]
type = "docker"
execd_image = "opensandbox/execd:v1.0.21"
[egress]
image = "opensandbox/egress:v1.1.4"
[docker]
network_mode = "bridge"
host_ip = "host.docker.internal"
[ingress]
mode = "direct"
......@@ -5,12 +5,22 @@
# root 默认密码(重启后会强制重置该密码成环境变量值)
x-default-root-psw: &x-default-root-psw '1234'
# FastGPT 前端访问地址,必须填写用户实际访问 FastGPT 的地址
x-fe-domain: &x-fe-domain ''
# Sandbox Proxy WebSocket 地址,必须填写用户实际访问地址
x-agent-sandbox-proxy-url: &x-agent-sandbox-proxy-url ''
# Sandbox Proxy HTTP 预览地址,必须填写用户实际访问地址
x-agent-sandbox-preview-proxy-url: &x-agent-sandbox-preview-proxy-url ''
# 系统最高密钥凭证
x-system-key: &x-system-key 'fastgpt-xxx'
# plugin auth token
x-plugin-auth-token: &x-plugin-auth-token 'token'
x-plugin-auth-token: &x-plugin-auth-token 'fastgpt_plugin_auth_token_32char'
# code sandbox token
x-code-sandbox-token: &x-code-sandbox-token 'codesandbox'
# agent sandbox proxy secret,必须与 FastGPT 主站环境变量保持一致,且至少 32 位
x-agent-sandbox-proxy-secret: &x-agent-sandbox-proxy-secret 'default_fastgpt_agent_sandbox_proxy_secret'
# volume manager token,必须与 FastGPT 主站环境变量保持一致
x-volume-manager-auth-token: &x-volume-manager-auth-token 'vmtoken'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
......@@ -39,8 +49,44 @@ x-log-config: &x-log-config
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
x-no-proxy-config: &x-no-proxy-config
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
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
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-agent-sandbox-proxy,fastgpt-opensandbox-server,fastgpt-volume-manager,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-agent-sandbox-proxy,fastgpt-opensandbox-server,fastgpt-volume-manager,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
# FastGPT 主服务的 Agent Sandbox 配置
x-agent-sandbox-config: &x-agent-sandbox-config
AGENT_SANDBOX_PROVIDER: opensandbox
AGENT_SANDBOX_PROXY_SECRET: *x-agent-sandbox-proxy-secret
# 浏览器访问 agent-sandbox-proxy 的 WebSocket 地址。
AGENT_SANDBOX_PROXY_URL: *x-agent-sandbox-proxy-url
# 浏览器访问 Sandbox 文件预览的 HTTP(S) 地址。
AGENT_SANDBOX_PREVIEW_PROXY_URL: *x-agent-sandbox-preview-proxy-url
# 沙盒规模大小
AGENT_SANDBOX_CPU_COUNT: 1
AGENT_SANDBOX_MEMORY_MIB: 2048
AGENT_SANDBOX_STORAGE_SIZE_GI: 1
# 不活跃判断阈值
AGENT_SANDBOX_SUSPEND_MINUTES: 60
# 长期不活跃判断阈值
AGENT_SANDBOX_ARCHIVE_INACTIVE_DAYS: 7
AGENT_SANDBOX_WS_MAX_MESSAGE_BYTES: 67108864
AGENT_SANDBOX_WS_MAX_FRAME_BYTES: 16777216
# 自定义 npm/pip 源
AGENT_SANDBOX_NPM_REGISTRY:
AGENT_SANDBOX_PYPI_INDEX_URL:
# Opensandox 配置
AGENT_SANDBOX_OPENSANDBOX_BASEURL: http://fastgpt-opensandbox-server:8090
AGENT_SANDBOX_OPENSANDBOX_API_KEY: fastgpt-opensandbox-api-key
AGENT_SANDBOX_OPENSANDBOX_RUNTIME: docker
AGENT_SANDBOX_OPENSANDBOX_IMAGE: ghcr.io/labring/fastgpt-agent-sandbox:v0.3.0-beta4
AGENT_SANDBOX_OPENSANDBOX_USE_SERVER_PROXY: true
AGENT_SANDBOX_OPENSANDBOX_VOLUME_MANAGER_URL: http://fastgpt-volume-manager:3000
AGENT_SANDBOX_OPENSANDBOX_VOLUME_MANAGER_TOKEN: *x-volume-manager-auth-token
AGENT_SANDBOX_OPENSANDBOX_VOLUME_NAME_PREFIX: fastgpt-session
# Sealos devbox 配置
AGENT_SANDBOX_SEALOS_BASEURL:
AGENT_SANDBOX_SEALOS_TOKEN:
AGENT_SANDBOX_SEALOS_WORK_DIRECTORY: /home/devbox/workspace
AGENT_SANDBOX_SEALOS_IMAGE:
# 向量库相关配置
x-vec-config: &x-vec-config
......@@ -157,7 +203,7 @@ services:
fastgpt-app:
container_name: fastgpt-app
image: ghcr.io/labring/fastgpt:v4.15.4
image: ghcr.io/labring/fastgpt:v4.16.0-beta1
ports:
- 3000:3000
networks:
......@@ -181,11 +227,11 @@ services:
restart: always
environment:
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
<<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
<<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config, *x-agent-sandbox-config]
HOSTNAME: 0.0.0.0
# ==================== 基础配置 ====================
# 必填。客户端访问 FastGPT 时使用的地址,由协议、主机和可选端口组成,用于补全文件资源路径。例如 https://fastgpt.cn;本地开发可使用 http://localhost:3000。
FE_DOMAIN:
FE_DOMAIN: *x-fe-domain
# root key(最高权限)
ROOT_KEY: *x-system-key
# root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。
......@@ -216,11 +262,9 @@ services:
AIPROXY_API_ENDPOINT: http://fastgpt-aiproxy:3000
# AI Proxy 的 Admin Token,与 AI Proxy 中的环境变量 ADMIN_KEY
AIPROXY_API_TOKEN: *x-aiproxy-token
PASSWORD_LOGIN_MINUTE_LIMIT_COUNT:
# MCP Server 代理地址,用于 MCP 使用方式页拼接 SSE 地址
SSE_MCP_SERVER_PROXY_ENDPOINT:
# 官网访客归因 CRM;地址需包含 /api/v1,为空时不进行身份上报
CRM_API_URL:
CRM_API_KEY:
# ==================== 日志与监控 ====================
# 传递给 OTLP 收集器的服务名称
......@@ -253,7 +297,7 @@ services:
TEXTIN_SECRET_CODE:
fastgpt-code-sandbox:
container_name: fastgpt-code-sandbox
image: ghcr.io/labring/fastgpt-code-sandbox:v4.15.4
image: ghcr.io/labring/fastgpt-code-sandbox:v4.15.6
networks:
- codesandbox
restart: always
......@@ -317,7 +361,7 @@ services:
<<: [*x-log-config, *x-no-proxy-config]
FASTGPT_ENDPOINT: http://fastgpt-app:3000
fastgpt-plugin:
image: ghcr.io/labring/fastgpt-plugin:v1.0.2
image: ghcr.io/labring/fastgpt-plugin:v1.1.0-beta1
container_name: fastgpt-plugin
restart: always
networks:
......@@ -343,6 +387,90 @@ services:
timeout: 20s
retries: 3
# OpenSandbox Server 和 Volume Manager 仅需在 app 内网中访问。
fastgpt-opensandbox-server:
image: opensandbox/server:v0.2.1
container_name: fastgpt-opensandbox-server
restart: always
networks:
- app
volumes:
- /var/run/docker.sock:/var/run/docker.sock
configs:
- source: opensandbox-config
target: /etc/opensandbox/config.toml
environment:
<<: [*x-no-proxy-config]
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck:
test:
[
'CMD',
'python',
'-c',
"import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://localhost:8090/health',timeout=3).status==200 else 1)"
]
interval: 10s
timeout: 5s
retries: 5
fastgpt-volume-manager:
image: ghcr.io/labring/fastgpt-agent-volume-manager:v0.3.0-beta4
container_name: fastgpt-volume-manager
restart: always
networks:
- app
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
<<: [*x-no-proxy-config]
PORT: 3000
VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token
VM_LOG_LEVEL: info
healthcheck:
test:
[
'CMD',
'node',
'-e',
"fetch('http://localhost:3000/health').then((res) => { if (!res.ok) process.exit(1); }).catch(() => process.exit(1));"
]
interval: 10s
timeout: 5s
retries: 5
# 仅用于预拉取运行时镜像,不会随 docker compose up 启动。
opensandbox-agent-sandbox-image:
image: ghcr.io/labring/fastgpt-agent-sandbox:v0.3.0-beta4
profiles:
- prepull
opensandbox-execd-image:
image: opensandbox/execd:v1.0.21
profiles:
- prepull
opensandbox-egress-image:
image: opensandbox/egress:v1.1.4
profiles:
- prepull
# 浏览器访问 Agent Sandbox 的鉴权代理,生产环境应通过独立域名反向代理 3006 端口。
fastgpt-agent-sandbox-proxy:
image: ghcr.io/labring/fastgpt-agent-sandbox-proxy:v0.3.0-beta4
container_name: fastgpt-agent-sandbox-proxy
restart: always
networks:
- app
ports:
- 3006:1006
environment:
<<: [*x-no-proxy-config]
PORT: 1006
AGENT_SANDBOX_PROXY_SECRET: *x-agent-sandbox-proxy-secret
FASTGPT_APP_URL: http://fastgpt-app:3000
FASTGPT_APP_REQUEST_TIMEOUT_SECS: 60
RUST_LOG: info,fastgpt_agent_sandbox_proxy=debug
# AI Proxy
fastgpt-aiproxy:
image: ghcr.io/labring/aiproxy:v0.6.5
......@@ -414,3 +542,26 @@ volumes:
fastgpt-seekdb-data:
fastgpt-seekdb-config:
fastgpt-aiproxy_pg:
configs:
opensandbox-config:
content: |
[server]
host = "0.0.0.0"
port = 8090
api_key = "fastgpt-opensandbox-api-key"
log_level = "INFO"
[runtime]
type = "docker"
execd_image = "opensandbox/execd:v1.0.21"
[egress]
image = "opensandbox/egress:v1.1.4"
[docker]
network_mode = "bridge"
host_ip = "host.docker.internal"
[ingress]
mode = "direct"
......@@ -5,12 +5,22 @@
# root 默认密码(重启后会强制重置该密码成环境变量值)
x-default-root-psw: &x-default-root-psw '1234'
# FastGPT 前端访问地址,必须填写用户实际访问 FastGPT 的地址
x-fe-domain: &x-fe-domain ''
# Sandbox Proxy WebSocket 地址,必须填写用户实际访问地址
x-agent-sandbox-proxy-url: &x-agent-sandbox-proxy-url ''
# Sandbox Proxy HTTP 预览地址,必须填写用户实际访问地址
x-agent-sandbox-preview-proxy-url: &x-agent-sandbox-preview-proxy-url ''
# 系统最高密钥凭证
x-system-key: &x-system-key 'fastgpt-xxx'
# plugin auth token
x-plugin-auth-token: &x-plugin-auth-token 'token'
x-plugin-auth-token: &x-plugin-auth-token 'fastgpt_plugin_auth_token_32char'
# code sandbox token
x-code-sandbox-token: &x-code-sandbox-token 'codesandbox'
# agent sandbox proxy secret,必须与 FastGPT 主站环境变量保持一致,且至少 32 位
x-agent-sandbox-proxy-secret: &x-agent-sandbox-proxy-secret 'default_fastgpt_agent_sandbox_proxy_secret'
# volume manager token,必须与 FastGPT 主站环境变量保持一致
x-volume-manager-auth-token: &x-volume-manager-auth-token 'vmtoken'
# aiproxy token
x-aiproxy-token: &x-aiproxy-token 'token'
# 数据库连接相关配置
......@@ -39,8 +49,44 @@ x-log-config: &x-log-config
# 容器运行环境可能会自动注入 HTTP_PROXY/HTTPS_PROXY。
# 明确绕过 compose 内部服务,避免内部请求被代理劫持。
x-no-proxy-config: &x-no-proxy-config
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
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
NO_PROXY: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-agent-sandbox-proxy,fastgpt-opensandbox-server,fastgpt-volume-manager,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
no_proxy: localhost,127.0.0.1,::1,fastgpt-app,fastgpt-plugin,fastgpt-code-sandbox,fastgpt-agent-sandbox-proxy,fastgpt-opensandbox-server,fastgpt-volume-manager,fastgpt-aiproxy,fastgpt-aiproxy-pg,fastgpt-minio,fastgpt-mongo,fastgpt-redis,fastgpt-vector,fastgpt-mcp-server,host.docker.internal,*.orb.internal,*.orb.local
# FastGPT 主服务的 Agent Sandbox 配置
x-agent-sandbox-config: &x-agent-sandbox-config
AGENT_SANDBOX_PROVIDER: opensandbox
AGENT_SANDBOX_PROXY_SECRET: *x-agent-sandbox-proxy-secret
# 浏览器访问 agent-sandbox-proxy 的 WebSocket 地址。
AGENT_SANDBOX_PROXY_URL: *x-agent-sandbox-proxy-url
# 浏览器访问 Sandbox 文件预览的 HTTP(S) 地址。
AGENT_SANDBOX_PREVIEW_PROXY_URL: *x-agent-sandbox-preview-proxy-url
# 沙盒规模大小
AGENT_SANDBOX_CPU_COUNT: 1
AGENT_SANDBOX_MEMORY_MIB: 2048
AGENT_SANDBOX_STORAGE_SIZE_GI: 1
# 不活跃判断阈值
AGENT_SANDBOX_SUSPEND_MINUTES: 60
# 长期不活跃判断阈值
AGENT_SANDBOX_ARCHIVE_INACTIVE_DAYS: 7
AGENT_SANDBOX_WS_MAX_MESSAGE_BYTES: 67108864
AGENT_SANDBOX_WS_MAX_FRAME_BYTES: 16777216
# 自定义 npm/pip 源
AGENT_SANDBOX_NPM_REGISTRY:
AGENT_SANDBOX_PYPI_INDEX_URL:
# Opensandox 配置
AGENT_SANDBOX_OPENSANDBOX_BASEURL: http://fastgpt-opensandbox-server:8090
AGENT_SANDBOX_OPENSANDBOX_API_KEY: fastgpt-opensandbox-api-key
AGENT_SANDBOX_OPENSANDBOX_RUNTIME: docker
AGENT_SANDBOX_OPENSANDBOX_IMAGE: ghcr.io/labring/fastgpt-agent-sandbox:v0.3.0-beta4
AGENT_SANDBOX_OPENSANDBOX_USE_SERVER_PROXY: true
AGENT_SANDBOX_OPENSANDBOX_VOLUME_MANAGER_URL: http://fastgpt-volume-manager:3000
AGENT_SANDBOX_OPENSANDBOX_VOLUME_MANAGER_TOKEN: *x-volume-manager-auth-token
AGENT_SANDBOX_OPENSANDBOX_VOLUME_NAME_PREFIX: fastgpt-session
# Sealos devbox 配置
AGENT_SANDBOX_SEALOS_BASEURL:
AGENT_SANDBOX_SEALOS_TOKEN:
AGENT_SANDBOX_SEALOS_WORK_DIRECTORY: /home/devbox/workspace
AGENT_SANDBOX_SEALOS_IMAGE:
# 向量库相关配置
x-vec-config: &x-vec-config
......@@ -135,7 +181,7 @@ services:
fastgpt-app:
container_name: fastgpt-app
image: ghcr.io/labring/fastgpt:v4.15.4
image: ghcr.io/labring/fastgpt:v4.16.0-beta1
ports:
- 3000:3000
networks:
......@@ -157,11 +203,11 @@ services:
restart: always
environment:
# 完整变量请参考: https://github.com/labring/FastGPT/blob/main/projects/app/.env.template
<<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config]
<<: [*x-share-db-config, *x-vec-config, *x-log-config, *x-no-proxy-config, *x-agent-sandbox-config]
HOSTNAME: 0.0.0.0
# ==================== 基础配置 ====================
# 必填。客户端访问 FastGPT 时使用的地址,由协议、主机和可选端口组成,用于补全文件资源路径。例如 https://fastgpt.cn;本地开发可使用 http://localhost:3000。
FE_DOMAIN:
FE_DOMAIN: *x-fe-domain
# root key(最高权限)
ROOT_KEY: *x-system-key
# root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。
......@@ -192,11 +238,9 @@ services:
AIPROXY_API_ENDPOINT: http://fastgpt-aiproxy:3000
# AI Proxy 的 Admin Token,与 AI Proxy 中的环境变量 ADMIN_KEY
AIPROXY_API_TOKEN: *x-aiproxy-token
PASSWORD_LOGIN_MINUTE_LIMIT_COUNT:
# MCP Server 代理地址,用于 MCP 使用方式页拼接 SSE 地址
SSE_MCP_SERVER_PROXY_ENDPOINT:
# 官网访客归因 CRM;地址需包含 /api/v1,为空时不进行身份上报
CRM_API_URL:
CRM_API_KEY:
# ==================== 日志与监控 ====================
# 传递给 OTLP 收集器的服务名称
......@@ -229,7 +273,7 @@ services:
TEXTIN_SECRET_CODE:
fastgpt-code-sandbox:
container_name: fastgpt-code-sandbox
image: ghcr.io/labring/fastgpt-code-sandbox:v4.15.4
image: ghcr.io/labring/fastgpt-code-sandbox:v4.15.6
networks:
- codesandbox
restart: always
......@@ -293,7 +337,7 @@ services:
<<: [*x-log-config, *x-no-proxy-config]
FASTGPT_ENDPOINT: http://fastgpt-app:3000
fastgpt-plugin:
image: ghcr.io/labring/fastgpt-plugin:v1.0.2
image: ghcr.io/labring/fastgpt-plugin:v1.1.0-beta1
container_name: fastgpt-plugin
restart: always
networks:
......@@ -319,6 +363,90 @@ services:
timeout: 20s
retries: 3
# OpenSandbox Server 和 Volume Manager 仅需在 app 内网中访问。
fastgpt-opensandbox-server:
image: opensandbox/server:v0.2.1
container_name: fastgpt-opensandbox-server
restart: always
networks:
- app
volumes:
- /var/run/docker.sock:/var/run/docker.sock
configs:
- source: opensandbox-config
target: /etc/opensandbox/config.toml
environment:
<<: [*x-no-proxy-config]
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
healthcheck:
test:
[
'CMD',
'python',
'-c',
"import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://localhost:8090/health',timeout=3).status==200 else 1)"
]
interval: 10s
timeout: 5s
retries: 5
fastgpt-volume-manager:
image: ghcr.io/labring/fastgpt-agent-volume-manager:v0.3.0-beta4
container_name: fastgpt-volume-manager
restart: always
networks:
- app
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
<<: [*x-no-proxy-config]
PORT: 3000
VM_RUNTIME: docker
VM_AUTH_TOKEN: *x-volume-manager-auth-token
VM_LOG_LEVEL: info
healthcheck:
test:
[
'CMD',
'node',
'-e',
"fetch('http://localhost:3000/health').then((res) => { if (!res.ok) process.exit(1); }).catch(() => process.exit(1));"
]
interval: 10s
timeout: 5s
retries: 5
# 仅用于预拉取运行时镜像,不会随 docker compose up 启动。
opensandbox-agent-sandbox-image:
image: ghcr.io/labring/fastgpt-agent-sandbox:v0.3.0-beta4
profiles:
- prepull
opensandbox-execd-image:
image: opensandbox/execd:v1.0.21
profiles:
- prepull
opensandbox-egress-image:
image: opensandbox/egress:v1.1.4
profiles:
- prepull
# 浏览器访问 Agent Sandbox 的鉴权代理,生产环境应通过独立域名反向代理 3006 端口。
fastgpt-agent-sandbox-proxy:
image: ghcr.io/labring/fastgpt-agent-sandbox-proxy:v0.3.0-beta4
container_name: fastgpt-agent-sandbox-proxy
restart: always
networks:
- app
ports:
- 3006:1006
environment:
<<: [*x-no-proxy-config]
PORT: 1006
AGENT_SANDBOX_PROXY_SECRET: *x-agent-sandbox-proxy-secret
FASTGPT_APP_URL: http://fastgpt-app:3000
FASTGPT_APP_REQUEST_TIMEOUT_SECS: 60
RUST_LOG: info,fastgpt_agent_sandbox_proxy=debug
# AI Proxy
fastgpt-aiproxy:
image: ghcr.io/labring/aiproxy:v0.6.5
......@@ -390,3 +518,26 @@ volumes:
fastgpt-seekdb-data:
fastgpt-seekdb-config:
fastgpt-aiproxy_pg:
configs:
opensandbox-config:
content: |
[server]
host = "0.0.0.0"
port = 8090
api_key = "fastgpt-opensandbox-api-key"
log_level = "INFO"
[runtime]
type = "docker"
execd_image = "opensandbox/execd:v1.0.21"
[egress]
image = "opensandbox/egress:v1.1.4"
[docker]
network_mode = "bridge"
host_ip = "host.docker.internal"
[ingress]
mode = "direct"
This diff is collapsed. Click to expand it.
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