重构模型平台前后端并移除Redis依赖
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
# Model Platform Refactored
|
||||
|
||||
本项目是简化后的模型实验开发平台:React Router 前端、FastAPI Backend、
|
||||
Runtime、Schedule Executor、MySQL、RustFS、共享 Jupyter 与 Nginx Gateway。
|
||||
Redis 已移除。
|
||||
|
||||
## 目录
|
||||
|
||||
```text
|
||||
frontend/app/
|
||||
components/ 通用组件
|
||||
features/platform/ 平台主框架与脚本工作台
|
||||
features/schedules/ 调度画布
|
||||
features/admin/ 工作台与系统管理
|
||||
routes/ React Router 路由
|
||||
services/ API 调用与 DTO
|
||||
backend/ 核心业务 API
|
||||
runtime/ Jupyter 与文件编辑租约
|
||||
schedule/ APScheduler + DAG Executor
|
||||
common/ 数据库模型和公共能力
|
||||
nginx/ 前端静态站点与统一反向代理
|
||||
```
|
||||
|
||||
## 简化后的调用链
|
||||
|
||||
```text
|
||||
Browser -> Nginx Gateway -> FastAPI Backend -> MySQL / RustFS
|
||||
-> Runtime -> shared Jupyter
|
||||
Backend --HTTP push-----> Schedule Executor
|
||||
Schedule Executor --poll MySQL Outbox / APScheduler--> execute DAG
|
||||
```
|
||||
|
||||
## 启动
|
||||
|
||||
Windows PowerShell:
|
||||
|
||||
```powershell
|
||||
Copy-Item .env.example .env
|
||||
docker compose config
|
||||
docker compose up -d --build
|
||||
docker compose ps
|
||||
```
|
||||
|
||||
Git Bash/Linux:
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
docker compose config
|
||||
docker compose up -d --build
|
||||
docker compose ps
|
||||
```
|
||||
|
||||
访问:`http://127.0.0.1:8081`。
|
||||
|
||||
查看日志:
|
||||
|
||||
```bash
|
||||
docker compose logs -f backend runtime schedule gateway
|
||||
```
|
||||
|
||||
数据库迁移由 `migrate` 一次性容器在 Backend 启动前自动执行。
|
||||
|
||||
## Windows 快速脚本
|
||||
|
||||
```powershell
|
||||
.\scripts\start.ps1
|
||||
.\scripts\logs.ps1
|
||||
.\scripts\stop.ps1
|
||||
```
|
||||
Reference in New Issue
Block a user