Files
secondary-school-grade-archive/README.md
T
dekun e797d188ee Switch production deployment from Docker to PM2 on Ubuntu.
Add Express gateway, ecosystem config, and one-click install with native PostgreSQL, Node, and Python venv on port 23566.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-28 11:52:20 +08:00

81 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 中学成绩档案(初中 / 高中)
Secondary School Grade Archive — 多用户 Web 系统:成绩录入、占比趋势分析、错题 OCR + 本地 AI 解法。
**版权所有 © 马建军** · 微信 **dekun03** · 手机 **18364911125**
> [COPYRIGHT.md](./COPYRIGHT.md) · [LICENSE](./LICENSE)
**仓库:** [https://git.bz121.com/dekun/secondary-school-grade-archive.git](https://git.bz121.com/dekun/secondary-school-grade-archive.git)
---
## 文档
| 文档 | 说明 |
|------|------|
| [docs/DEPLOY.md](./docs/DEPLOY.md) | **Ubuntu PM2 一键部署** |
| [docs/USAGE.md](./docs/USAGE.md) | 用户使用说明 |
---
## Ubuntu 一键部署(PM2
```bash
git clone https://git.bz121.com/dekun/secondary-school-grade-archive.git /opt/secondary-school-grade-archive
cd /opt/secondary-school-grade-archive
chmod +x deploy/*.sh
bash deploy/install.sh
```
- 安装目录:`/opt/secondary-school-grade-archive`
- 访问地址:`http://<服务器IP>:23566`
- 进程管理:`pm2 status` / `pm2 logs`
详见 [docs/DEPLOY.md](./docs/DEPLOY.md)。**反向代理不包含在本项目中。**
---
## 本地开发
```bash
# PostgreSQL 本地安装后
cp backend/.env.example backend/.env
cd backend
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000
cd frontend
npm install && npm run dev
```
开发前端:http://localhost:5173(代理 `/api` 到 8000
生产网关本地模拟:
```bash
cd deploy/pm2 && npm install
# 先 build 前端
cd ../../frontend && npm run build
WEB_PORT=23566 pm2 start ../deploy/pm2/ecosystem.config.cjs
```
---
## 运维
```bash
bash deploy/update.sh # 更新
bash deploy/backup.sh # 备份
bash deploy/uninstall.sh # 停止
```
---
## 技术支持
微信 **dekun03** · 手机 **18364911125**