Files
rogee b6d0af1a56
management-images / build-and-publish (push) Successful in 9m15s
docs: add one-click management deployment and image workflow
2026-09-16 17:57:05 +08:00

67 lines
2.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# agent-call
## SIP 管理后台一键部署
管理后台是仓库内独立项目,默认只运行隔离的 `mock` 模式,不连接真实 SIP、MQ、OSS、云资源或旧 Python 服务,也不会自动拨号。
### 1. 源码构建运行(推荐首次验证)
依赖 Docker Engine 和 Docker Compose v2
```bash
git clone git@git.ipao.vip:rogee/agent-call.git
cd agent-call
docker compose -f management/deploy/compose.yaml up -d --build
```
访问 <http://localhost:3000/dashboard/overview>,在页面会话中输入演示令牌:
```text
dev-admin-token
```
检查服务:
```bash
curl http://localhost:8080/healthz/live
docker compose -f management/deploy/compose.yaml logs -f management-api
docker compose -f management/deploy/compose.yaml down
```
停止并删除本地演示数据库卷(会删除演示数据):
```bash
docker compose -f management/deploy/compose.yaml down -v
```
默认端口为 API `8080`、页面 `3000`。端口冲突时可显式覆盖:
```bash
MANAGEMENT_API_PORT=18080 MANAGEMENT_UI_PORT=13001 \
MANAGEMENT_ALLOWED_ORIGINS=http://localhost:13001 \
MANAGEMENT_UI_API_URL=http://localhost:18080 \
docker compose -f management/deploy/compose.yaml up -d --build
```
### 2. 使用 Gitea Container Registry 镜像
`.gitea/workflows/management-images.yml` 会在 Pull Request 上构建校验,在 `main``v*` 标签上构建并推送:
```text
git.ipao.vip/rogee/agent-call-management-api:<commit-or-tag>
git.ipao.vip/rogee/agent-call-management-ui:<commit-or-tag>
```
Action 运行前,在 Gitea 账户级 Actions Secret 配置 `REGISTRY_TOKEN`;不要把令牌写入仓库。需要固定前端 API 地址时,配置非敏感的 Actions Variable `MANAGEMENT_UI_API_URL`。镜像发布完成后使用:
```bash
docker login git.ipao.vip
export MANAGEMENT_API_IMAGE=git.ipao.vip/rogee/agent-call-management-api:latest
export MANAGEMENT_UI_IMAGE=git.ipao.vip/rogee/agent-call-management-ui:latest
docker compose -f management/deploy/compose.images.yaml up -d
```
镜像 Compose 同样只启动隔离 `mock`;生产使用前必须替换令牌、TLS/mTLS、允许来源、数据库和外部核验配置,并单独完成真实供应商/SIP/RTP/MQ/OSS/AI 验收。
更多开发、契约同步、测试和安全边界见 [`management/README.md`](management/README.md)。