|
Some checks failed
CI / test (push) Failing after 32s
- Add Cron Pool Monitor entry to sidebar menu - Install Docker CE CLI from Aliyun mirror for container exec - Mount Docker socket for managing openclaw-eval container - Fix OpenClaw CLI commands (cron add/rm/list instead of automations) - Add gateway token auth for CLI access |
||
|---|---|---|
| .. | ||
| docker-compose.yml | ||
| Dockerfile | ||
| README.md | ||
t480 测试服务器容器化部署方案
环境摘要
| 项目 | 值 |
|---|---|
| 主机 | sola-t480 (Ubuntu 24.04, kernel 6.17) |
| IP | 192.168.8.145 |
| Docker | 29.1.3 |
| Docker Compose | v2.29.2 |
| Python / Node | 3.12.3 / 24.14.0 |
| 资源 | 31 GB RAM / 250 GB 可用磁盘 |
部署架构
- 单容器部署:Python FastAPI 后端同时提供
/api/*和前端 React SPA 静态资源。 - 数据持久化:通过
data/目录挂载保存 SQLite 数据库与 HTML 报告。 - 配置挂载:
config/config.json以只读方式挂载到容器内,用于 CLI 注册/更新评测对象。
部署步骤
-
确认本地配置存在
确保项目根目录已有
config/config.json(tutu-api token 等敏感信息)。 -
同步代码到 t480
rsync -avz --delete \ --exclude='.git' \ --exclude='node_modules' \ --exclude='frontend/web/dist' \ --exclude='data' \ --exclude='.venv' \ --exclude='__pycache__' \ --exclude='.pytest_cache' \ --exclude='.ruff_cache' \ /Users/sinohuangqb/DevSpace/JkzlItProduct/AgentEvalTool/ \ sola-t480:/opt/agenteval/ -
在 t480 上构建并启动
ssh sola-t480 cd /opt/agenteval docker compose -f deploy/t480/docker-compose.yml up -d --build -
健康检查
curl http://192.168.8.145:8000/api/health期望返回
{"status":"ok"},并能在浏览器打开http://192.168.8.145:8000/看到前端页面。 -
注册/更新评测对象(如需要)
docker exec -it agenteval agenteval target add \ --name "社区医院AI客服" \ --config /app/config/config.json -
执行一次评测验证
获取 target-id 与 scenario-id 后:
docker exec -it agenteval agenteval run start \ --target-id <target-id> \ --scenario-id <scenario-id>
日常运维
- 查看日志:
docker logs -f agenteval - 重启服务:
docker compose -f deploy/t480/docker-compose.yml restart - 更新版本:重新执行第 2 步 rsync +
docker compose ... up -d --build
可选:添加反向代理
如果后续需要域名/HTTPS,可在 t480 上再起一个 Nginx/Caddy 容器,将 80/443 反向代理到本机的 127.0.0.1:8000。