feat: scaffold gold_monitor web hub, API, PM2 deploy and docs

This commit is contained in:
dekun
2026-10-17 17:43:17 +08:00
commit fb35968a1f
35 changed files with 2080 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
# 环境一键部署(Ubuntu / root /opt)
在 **`/opt/gold_monitor`** 下以 **root** 部署 Flask Web+API,使用 **PM2** 常驻,端口 **5800**。
完整说明见 **[docs/ubuntu-server.md](../docs/ubuntu-server.md)** · **[docs/deploy.md](../docs/deploy.md)**。
---
## 一键部署管理器(推荐)
新服务器无需先 clone:
```bash
curl -fsSL https://git.bz121.com/dekun/gold_monitor/raw/branch/main/deploy/manage.sh | bash
```
已安装机器:
```bash
bash /opt/gold_monitor/deploy/manage.sh
```
### 菜单
| 选项 | 功能 |
|------|------|
| **1) 一键部署** | 依赖 + venv + PM2 + 验收 `/health` |
| **2) 一键卸载** | 备份 `.env`/`data` → 停 PM2 → 可选删目录 |
| **3) 更新** | git pull / 依赖更新 + restart |
| **0) 退出** | |
### 部署完成后
- 地址:`http://<服务器IP>:5800`
- 登录:`admin` / `admin123`(请改 `.env`)
- 将通用 exe 放到:`/opt/gold_monitor/releases/黄金市价辅助.exe`