|
|
@@ -7,11 +7,11 @@ C/S 架构数学题库管理系统 — 服务端。Python + FastAPI + SQLite,
|
|
|
```bash
|
|
|
git clone ssh://git@xn--48s96u.top:10022/nonvioce/tiku.git /opt/tiku-server
|
|
|
cd /opt/tiku-server/tiku-server
|
|
|
-bash install.sh # 安装依赖、构建知识点
|
|
|
-nohup bash run.sh > tiku.log 2>&1 & # 后台启动(崩溃/更新自动重启)
|
|
|
+bash install.sh # 安装依赖、构建知识点
|
|
|
+nohup ./tiku-server serve --restart > tiku.log 2>&1 & # 后台启动(崩溃/更新自动重启)
|
|
|
```
|
|
|
|
|
|
-部署后打开 `http://<服务器IP>:8765`,使用 `./tiku-server token` 查看 API Token。
|
|
|
+部署后打开 `http://<服务器IP>:8765`,Token 首次启动自动生成(`./tiku-server token` 查看)。
|
|
|
|
|
|
## 目录结构
|
|
|
|
|
|
@@ -50,7 +50,6 @@ tiku-server/
|
|
|
├── web/ # Flutter Web 构建产物(可选)
|
|
|
├── config.yaml # 配置文件
|
|
|
├── install.sh # 安装脚本
|
|
|
-├── run.sh # 启动+自动重启脚本
|
|
|
├── tiku-server # CLI 入口
|
|
|
└── requirements.txt # Python 依赖
|
|
|
```
|
|
|
@@ -60,6 +59,7 @@ tiku-server/
|
|
|
| 命令 | 说明 |
|
|
|
|------|------|
|
|
|
| `./tiku-server serve` | 启动 FastAPI 服务 |
|
|
|
+| `./tiku-server serve --restart` | 启动服务(崩溃/git-update 后自动重启) |
|
|
|
| `./tiku-server knowledge build` | 解析 `src/知识点树.md` 生成编码映射 |
|
|
|
| `./tiku-server rebuild-index` | 手动增量扫描 problems/ 目录 |
|
|
|
| `./tiku-server stats` | 终端显示题库统计 |
|