开源开发
从 0 到 1 部署
从一台空机器启动私有 Monkeys 环境
这篇文档从一台干净的开发机器开始,按当前多仓库结构启动一个私有 Monkeys 环境。
1. 准备机器
安装:
- Git
- Docker Engine 或 Docker Desktop
- Docker Compose v2
- Node.js 18 或更高版本
- Yarn 1.x,用于主要 Node.js 服务
Docker 需要同时运行 PostgreSQL、Redis、Elasticsearch、Conductor、MinIO、Prometheus、Grafana 和产品服务。如果使用 Docker Desktop,建议尽量分配至少 12 GB 内存。
2. 创建工作区
建议把 Monkeys 仓库放在同一个父级目录下。monkeys 仓库里的 compose 文件会按这个布局构建服务镜像。
mkdir -p INFMONKEYS
cd INFMONKEYS
git clone https://github.com/infmonkeys/monkeys.git
git clone https://github.com/infmonkeys/monkeys-server.git
git clone https://github.com/infmonkeys/monkeys-studio.git
git clone https://github.com/infmonkeys/monkeys-kernel.git
git clone https://github.com/infmonkeys/monkeys-compute.git可选能力服务按需克隆:
git clone https://github.com/infmonkeys/monkeys-agent-server.git
git clone https://github.com/infmonkeys/monkeys-billing-server.git
git clone https://github.com/infmonkeys/monkeys-data-server.git
git clone https://github.com/infmonkeys/monkeys-webhook-server.git
git clone https://github.com/infmonkeys/monkeys-mcp-server.git
git clone https://github.com/infmonkeys/monkeys-conductor-worker.git
git clone https://github.com/infmonkeys/monkeys-training-worker.git
git clone https://github.com/infmonkeys/monkeys-comfyui-worker.git
git clone https://github.com/infmonkeys/monkey-tools-third-party-api.git
git clone https://github.com/infmonkeys/monkey-tools-third-party-api-python.git
git clone https://github.com/infmonkeys/monkey-tools-sandbox.git
git clone https://github.com/infmonkeys/monkey-tools-agentkits.git3. 启动基础设施
基础设施 compose 文件位于 hub 仓库。
cd monkeys/docker/infrastructure
docker compose up -d本地端点:
| 服务 | 地址 |
|---|---|
| PostgreSQL | localhost:5432 |
| Redis | localhost:6379 |
| Elasticsearch | http://localhost:9200 |
| Conductor API | http://localhost:8080/api |
| Conductor UI | http://localhost:5008 |
| MinIO API | http://localhost:9000 |
| MinIO console | http://localhost:9001 |
| Prometheus | http://localhost:9090 |
| Grafana | http://localhost:3003 |
启动产品服务前先检查核心依赖:
docker compose ps
curl http://localhost:8080/health
curl http://localhost:9200/_cluster/health4. 启动核心产品服务
进入 services compose 目录:
cd ../services
docker compose up -d --build默认 profile 会构建并启动:
monkeys-servermonkeys-studiomonkeys-kernelmonkeys-compute
核心服务端口:
| 服务 | 地址 |
|---|---|
| Studio | http://localhost:3000 |
| 主后端 | http://localhost:33002 |
| Kernel 前端 | http://localhost:3001 |
| Compute 前端 | http://localhost:3002 |
5. 增加能力 Profile
只有在对应兄弟仓库已经克隆后,再启动可选 profile。
docker compose --profile agent up -d --build
docker compose --profile billing up -d --build
docker compose --profile data up -d --build
docker compose --profile webhook up -d --build
docker compose --profile mcp up -d --build
docker compose --profile worker up -d --build
docker compose --profile tools up -d --buildprofile 可以组合:
docker compose --profile agent --profile tools up -d --build6. 验证环境
启动后执行:
docker compose ps
curl http://localhost:33002然后打开 Studio:http://localhost:3000,创建或选择团队,配置模型凭证,并创建一个只包含一个模型节点和明确输出的小工作流进行验证。
7. 停止或重置
停止产品服务:
cd monkeys/docker/services
docker compose down停止基础设施:
cd ../infrastructure
docker compose down只有在你明确希望清空数据库和对象存储时,才删除本地基础设施数据:
docker compose down -v