agenthub/deploy/docker-compose.yml

49 lines
1.8 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# AgentHub 单机栈:hub(控制面)+ console(Web 控制台)+ 一个示例被纳管 Agent。
#
# cd deploy
# docker compose up -d --build # hub + console
# docker compose --profile managed-agent up -d --build # 再加上示例 Agent
#
# 控制台:http://127.0.0.1:3100 hub:http://127.0.0.1:8100(API 文档 /docs)
# 首次启动后取 API Key:docker compose exec hub cat /var/lib/agenthub/hub-credentials.json
services:
hub:
build:
context: ..
dockerfile: deploy/Dockerfile.backend
image: agenthub:latest
ports:
- "8100:8100"
environment:
# 浏览器/Agent 访问 hub 的地址,会写进注册命令与协作 briefing;换机器只改这一行
AGENTHUB_HUB_PUBLIC_URL: http://127.0.0.1:8100
AGENTHUB_DATA_DIR: /var/lib/agenthub
# 换数据库只改 URL(sqlite+aiosqlite:///... | postgresql+asyncpg://... | mysql+aiomysql://...)
# AGENTHUB_DATABASE_URL: postgresql+asyncpg://hub:hub@postgres:5432/agenthub
volumes:
- agenthub-data:/var/lib/agenthub
restart: unless-stopped
console:
build:
context: ..
dockerfile: deploy/Dockerfile.console
args:
# NEXT_PUBLIC_* 是构建期常量:hub 不在 127.0.0.1 时必须在这里改并重新 build
NEXT_PUBLIC_HUB_URL: http://127.0.0.1:8100
# hub 走 https/其它域名时补充 CSP,例如:https://hub.example.com wss://hub.example.com
CSP_CONNECT_SRC: ""
image: agenthub-console:latest
ports:
- "3100:3100"
depends_on:
- hub
restart: unless-stopped
# 想再纳管一个 Agent:用它的接入件(nanobot 用 deploy/nanobot-gateway,
# 其它框架照 docs/AGENT_REGISTRATION.md 的字段表写自己的 channel/插件)。
# hub 不再生成"跑一个桥接进程"的编排。
volumes:
agenthub-data: