28 lines
825 B
Markdown
28 lines
825 B
Markdown
## Ops-Core (Vite 静态 SPA + FastAPI)
|
||
|
||
当前前端已迁移为 **Vite + React SPA**(目录:`frontend_spa/`),生产构建产物为 `dist/`,由 Nginx 静态托管,并通过同域 `/api` 反代到 FastAPI。
|
||
|
||
### 启动方式(推荐)
|
||
- **生产/默认**:
|
||
|
||
```bash
|
||
./docker_dev.sh
|
||
```
|
||
|
||
- **开发(容器内 Vite 热更新,前端端口 3001)**:
|
||
|
||
```bash
|
||
./docker_dev.sh dev
|
||
```
|
||
|
||
开发模式访问:`http://localhost:3001`
|
||
生产模式访问:`http://localhost:3000`
|
||
|
||
### 目录说明
|
||
- `frontend_spa/`: 新前端(Vite SPA)
|
||
- `backend/`: 后端(FastAPI)
|
||
- `nginx_spa.conf`: 单机部署 Nginx 示例配置(history 路由 + `/api`/`/data` + SSE 禁用 buffering)
|
||
|
||
> 旧的 Next.js 前端目录 `frontend/` 已不再作为可运行入口,相关构建配置已移除,避免误用。
|
||
|