x
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
当前项目支持三种部署模式:
|
||||
|
||||
- **unified**:gemold + inventory 统一部署
|
||||
- **unified**:frontend + unified backend + celery,统一对外部署(当前推荐)
|
||||
- **gemold-only**:仅部署模具分析后端
|
||||
- **inventory-only**:仅部署进销存后端
|
||||
|
||||
@@ -140,6 +140,19 @@ RUSTFS_SECRET_KEY=minioadmin
|
||||
|
||||
## 6. 启动方式
|
||||
|
||||
## 6.0 frontend(同域反代入口)
|
||||
|
||||
当前推荐把前端作为独立静态站点部署,并通过同域 Nginx 反代到 unified backend:
|
||||
|
||||
- `/` → 前端静态资源与 SPA 路由
|
||||
- `/api` → unified backend
|
||||
- `/health` → unified backend
|
||||
- `/html` → unified backend(内部再提供 gemold 分析产物)
|
||||
|
||||
如果使用根目录 [docker-compose.yml](../../docker-compose.yml) 的 `frontend` 服务,则该入口已经内置在前端 Nginx 镜像中。
|
||||
|
||||
---
|
||||
|
||||
## 6.1 inventory-only
|
||||
|
||||
```bash
|
||||
@@ -285,7 +298,16 @@ WantedBy=multi-user.target
|
||||
|
||||
---
|
||||
|
||||
## 8. Nginx 反向代理示例
|
||||
## 8. Nginx / 前端同域反代示例
|
||||
|
||||
当前仓库已提供前端 Nginx 配置:
|
||||
- [deploy/nginx/frontend.conf](../../deploy/nginx/frontend.conf)
|
||||
|
||||
如果不使用仓库内 `frontend` 容器,也应遵循同样原则:
|
||||
- `/` 提供前端静态资源与 SPA fallback
|
||||
- `/api/` 反代后端
|
||||
- `/health` 反代后端
|
||||
- `/html/` 反代 gemold
|
||||
|
||||
### 8.1 inventory-only
|
||||
|
||||
@@ -373,11 +395,12 @@ curl http://127.0.0.1:8000/health
|
||||
|
||||
## 11. Docker Compose 说明
|
||||
|
||||
当前 [docker-compose.yml](../../docker-compose.yml) 仅启动:
|
||||
当前 [docker-compose.yml](../../docker-compose.yml) 会启动:
|
||||
|
||||
- `moldinsight`
|
||||
- `frontend`
|
||||
- `backend`
|
||||
- `moldinsight-celery`
|
||||
- `inventory`
|
||||
- 可选:`moldinsight` / `inventory`(独立模块模式)
|
||||
|
||||
它**不会**再拉起:
|
||||
|
||||
@@ -385,7 +408,7 @@ curl http://127.0.0.1:8000/health
|
||||
- Redis
|
||||
- MinIO
|
||||
|
||||
这些基础设施应由服务器现有服务提供,并通过 `.env` 传入连接信息。
|
||||
这些基础设施应由服务器现有服务提供,并通过 `.env` 传入连接信息;前端则由 `frontend` 容器独立提供,并通过同域反代转发到后端。
|
||||
|
||||
示例:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user