This commit is contained in:
2026-08-31 18:01:34 +08:00
parent 3ea59551db
commit bee439cf34
46 changed files with 1884 additions and 1898 deletions
+18 -13
View File
@@ -115,11 +115,13 @@ geMoldInsight/
│ └── package.json
│
├── alembic/ # Alembic migrations
├── deploy/ # 镜像构建与部署辅助文件
├── deploy/ # 镜像构建、Nginx 配置与部署辅助文件
│ ├── Dockerfile.base
│ ├── Dockerfile.moldinsight
│ ├── Dockerfile.inventory
│ └── Dockerfile.celery
│ ├── Dockerfile.celery
│ ├── Dockerfile.frontend
│ └── nginx/
│
├── docs/
├── tests/
@@ -192,13 +194,14 @@ geMoldInsight/
当前项目设计上支持三种模式:
### 1. unified
一个统一后端同时挂载 gemold + inventory。
### 1. unified(当前推荐)
一个统一后端同时挂载 gemold + inventory,并作为前端同域反代的默认 backend。
适合:
- 本地开发
- 集成环境
- 小团队统一部署
- 前端独立部署 + 单 upstream 反代
### 2. gemold-only
只部署模具分析后端。
@@ -300,15 +303,15 @@ RUSTFS_SECRET_KEY=your-secret-key
当前唯一 Compose 入口:
- [docker-compose.yml](docker-compose.yml)
该 compose 文件**只启动项目自身容器**:
- `moldinsight`
该 compose 文件会启动:
- `frontend`(独立前端 Nginx 静态站点)
- `backend`(unified backend,当前推荐)
- `moldinsight-celery`
- `inventory`
- 可选保留:`moldinsight` / `inventory`(模块独立部署 profile)
并通过 `.env` 连接服务器上**已经存在**的:
- PostgreSQL
- Redis
- RustFS / MinIO 兼容对象存储
其中:
- 前端通过同域反代把 `/api`、`/health`、`/html` 转发给 unified backend
- PostgreSQL / Redis / RustFS / MinIO 兼容对象存储仍由服务器现有服务提供
示例:
@@ -318,10 +321,12 @@ docker compose --profile full up -d
可选 profile:
- `full`
- `frontend`
- `unified`
- `moldinsight`
- `inventory`
> 说明:`docker-compose.yml` 不再重复部署 postgres / redis / minio,而是复用服务器现有基础设施。
> 说明:根目录 `docker-compose.yml` 是当前唯一 Compose 入口;前端已独立部署,并默认反代到 unified backend。
### 方式 B:直接启动后端入口
@@ -337,7 +342,7 @@ inventory-only:
uvicorn src.entrypoints.inventory:app --reload --host 0.0.0.0 --port 8001
```
### 方式 C:启动前端
### 方式 C:单独启动前端开发服务器
```bash
cd frontend