Standardize API port 23568 and web port 23566 across docs and dev config.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-28 13:07:46 +08:00
parent 2a5fb5f469
commit a3d4875bde
4 changed files with 8 additions and 7 deletions
+4 -3
View File
@@ -13,14 +13,14 @@
| 系统 | Ubuntu 20.04 / 22.04 / 24.04 |
| 用户 | **root** |
| 目录 | `/opt/secondary-school-grade-archive` |
| 端口 | **23566**Web + API 统一入口 |
| 端口 | **23566** 对外 Web**23568** 内部 API(仅本机 |
| 反向代理 | **不包含**,请自行配置 |
### 架构
```
浏览器 → :23566 (PM2: grade-web, Express 静态 + /api 反代)
└──→ 127.0.0.1:8000 (PM2: grade-api, Uvicorn)
└──→ 127.0.0.1:23568 (PM2: grade-api, Uvicorn)
└──→ PostgreSQL (本机)
└──→ uploads/
└──→ Ollama (本机可选, :11434)
@@ -72,7 +72,8 @@ bash deploy/install.sh
| 变量 | 默认 | 说明 |
|------|------|------|
| `WEB_PORT` | 23566 | 对外 Web 端口 |
| `API_PORT` | 8000 | 内部 API 端口 |
| `API_PORT` | 23568 | 内部 API 端口(仅本机,勿与 8000 等常用端口冲突) |
| `API_TARGET` | `http://127.0.0.1:23568` | Web 网关转发目标 |
| `DATABASE_URL` | 自动生成 | PostgreSQL 连接 |
| `SECRET_KEY` | 自动生成 | JWT 密钥 |
| `UPLOAD_DIR` | `.../uploads` | 错题图片目录 |