Files

37 lines
982 B
Markdown
Raw Permalink 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.
# 环境一键部署(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`