chore: initial commit of ai site platform
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
65
README.md
Normal file
65
README.md
Normal file
@@ -0,0 +1,65 @@
|
||||
# 宇信达智建
|
||||
|
||||
## 要不要上 K8s?
|
||||
|
||||
**现阶段不需要。** Docker Compose 已覆盖单机/小团队全栈;等出现多机部署、弹性扩缩容、灰度发布、服务网格等需求再上 Kubernetes。
|
||||
|
||||
## 推荐拓扑(默认 Docker)
|
||||
|
||||
```text
|
||||
浏览器
|
||||
→ web :5173 (nginx)
|
||||
→ gateway :8180
|
||||
→ platform :8888
|
||||
→ ai :8001
|
||||
→ postgres :5432
|
||||
```
|
||||
|
||||
数据挂载到仓库物理目录 `.runtime/`(不是仅存在容器层)。
|
||||
|
||||
## 启动
|
||||
|
||||
先启动 **Docker Desktop**(Windows)或确保 `docker compose` 可用。
|
||||
|
||||
一键启停脚本(`start.sh` / `start.ps1`、`scripts/lib-aijz-deploy.sh` 等)**不纳入本仓库**,仅留本机运维目录。克隆后请用本机脚本,或直接 Compose:
|
||||
|
||||
```bash
|
||||
docker compose up -d --build
|
||||
docker compose down # 保留 .runtime
|
||||
```
|
||||
|
||||
| 物理路径 | 内容 |
|
||||
|----------|------|
|
||||
| `.runtime/pgdata` | Postgres 数据 |
|
||||
| `.runtime/uploads` | 对象存储 |
|
||||
| `.runtime/logs` | (宿主机模式日志) |
|
||||
|
||||
打开 http://127.0.0.1:5173
|
||||
演示账号:`demo` / `demo123`
|
||||
|
||||
## 能力清单
|
||||
|
||||
| 能力 | 说明 |
|
||||
|------|------|
|
||||
| RBAC | JWT 含 `role`(owner/editor/viewer) |
|
||||
| 对象存储 | 上传落 `.runtime/uploads` |
|
||||
| 发布审计 | `GET /api/v1/audit/logs` |
|
||||
| database_per_app | 独立库;compose 内 platform 用户已具备建库权限 |
|
||||
| 网关鉴权 | JWT 预检 + 中台二次校验 |
|
||||
| 多模态 | 截图理解(可设 `OPENAI_API_KEY`) |
|
||||
|
||||
## 自动化测试
|
||||
|
||||
```powershell
|
||||
python scripts/e2e_flow.py
|
||||
```
|
||||
|
||||
## 网关路由
|
||||
|
||||
| 路径 | 上游 |
|
||||
|------|------|
|
||||
| `/api/v1/*` | platform |
|
||||
| `/ai/*` | AI |
|
||||
| `/gateway/health` | 健康检查 |
|
||||
|
||||
可选 APISIX 仍见 `gateway/README.md`(`:9080`),日常用 Compose 里的 Go 网关即可。
|
||||
Reference in New Issue
Block a user