Files
beaver_project/deploy-control/README.md
steven_li 53c42bb81b docs(README): 更新项目部署文档添加完整部署指南
更新 README.md 文件,提供详细的单机部署指南,包括:
- 完整的服务架构说明和请求链路图解
- 环境变量配置说明和示例
- 逐步部署流程(镜像构建、网络创建、服务启动)
- 健康检查和首次注册验收步骤
- 常见问题解答

同时更新各个子模块的 README 添加环境变量示例文件引用
2026-03-16 11:23:17 +08:00

54 lines
1.2 KiB
Markdown
Raw 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.

# deploy-control
部署机接口:
-`auth-portal` 提供实例创建和实例解析 API
- 调用 `app-instance/create-instance.sh`
- 在实例创建后刷新 `router-proxy`
## 接口
- `GET /healthz`
- `POST /api/instances/register`
- `POST /api/instances/resolve`
- `DELETE /api/instances/{instance_id}`
## 关键环境变量
- `DEPLOY_CONTROL_API_TOKEN`
- `APP_INSTANCE_API_KEY`
- `DEFAULT_AUTHZ_BASE_URL`
- `DEPLOY_PUBLIC_BASE_DOMAIN`
- `DEPLOY_PUBLIC_PORT`
- `DEPLOY_PUBLIC_SCHEME`
- `APP_INSTANCE_NETWORK_NAME`
建议直接参考:
- [`.env.example`](/home/ivan/xuan/nano_project/deploy-control/.env.example)
默认实例 URL 形如:
```text
http://<instance-slug>.127.0.0.1.nip.io:8088
```
实例容器本身的 `20000-29999` 端口默认只绑定到部署机 `127.0.0.1`,外部入口应走 `router-proxy`
## 本机启动
```bash
cd /home/ivan/xuan/nano_project/deploy-control
uv run server.py
```
## Docker 启动
如果要容器化运行,需要挂载:
- Docker socket`/var/run/docker.sock`
- `/home/ivan/xuan/nano_project/app-instance`
- `/home/ivan/xuan/nano_project/router-proxy`
并传入对应环境变量,让容器内脚本路径仍能访问这两个目录。