fix: dashboard port 5804→5807 (avoid conflicts with wechat_webhook and zhiwei bot)

This commit is contained in:
hmo
2026-07-19 10:56:42 +08:00
parent 747fdfe467
commit 782a914a3c
7 changed files with 42 additions and 24 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
# MoFin — Dashboard API 参考
> 版本: v1.0 | 端口: 5804 | 入口: http://192.168.1.246:5804
> 版本: v1.0 | 端口: 5807 | 入口: http://192.168.1.246:5807
---
@@ -94,7 +94,7 @@ MoFin Dashboard
crontab (每 5 分钟)
└── agents_health_check.py → last_health_check.json
Dashboard (:5804)
Dashboard (:5807)
├── /api/services ← 实时 TCP/HTTP 检测
├── /api/monitor ← 聚合读取 health check JSON
└── /api/module-spec/<module> ← 读取 specs/
+9 -9
View File
@@ -9,7 +9,7 @@
| 组件 | 守护方式 | 端口 | 说明 |
|------|---------|------|------|
| **server.py** | systemd `mofin-api` | 8899 | 持仓情报 API(已有,不动) |
| **dashboard.py** | systemd `mofin-dashboard` | 5804 | 管理门户(新增) |
| **dashboard.py** | systemd `mofin-dashboard` | 5807 | 管理门户(新增) |
| **health_check** | crontab `*/5 * * * *` | — | Tier1 健康检查(新增) |
---
@@ -49,9 +49,9 @@ sudo systemctl status mofin-dashboard
### 1.3 验证
```bash
curl http://127.0.0.1:5804/api/health
curl http://127.0.0.1:5804/api/services | python3 -m json.tool
# 浏览器访问: http://192.168.1.246:5804
curl http://127.0.0.1:5807/api/health
curl http://127.0.0.1:5807/api/services | python3 -m json.tool
# 浏览器访问: http://192.168.1.246:5807
```
---
@@ -71,18 +71,18 @@ crontab -l | grep health
## 3. 防火墙
```bash
sudo ufw status | grep -E '8899|5804'
sudo ufw status | grep -E '8899|5807'
# 如果未开放:
# sudo ufw allow 5804/tcp
# sudo ufw allow 5807/tcp
```
---
## 4. 部署后验证清单
- [ ] `curl http://127.0.0.1:5804/api/health``{"status":"ok"}`
- [ ] `curl http://127.0.0.1:5804/api/services` → 返回 5 个服务状态
- [ ] 浏览器打开 `http://192.168.1.246:5804` → Services Tab 显示服务状态
- [ ] `curl http://127.0.0.1:5807/api/health``{"status":"ok"}`
- [ ] `curl http://127.0.0.1:5807/api/services` → 返回 5 个服务状态
- [ ] 浏览器打开 `http://192.168.1.246:5807` → Services Tab 显示服务状态
- [ ] Dashboard F 健康 Tab → 定时任务状态显示正常
- [ ] 点击各模块 ?§ 按钮 → 弹出 spec 帮助内容
- [ ] `python3 agents_health_check.py` → 无输出(全正常)
+4 -4
View File
@@ -1,6 +1,6 @@
# MoFin — 快速操作手册
> 生产环境: Linux 192.168.1.246 | 端口: API 8899 / Dashboard 5804
> 生产环境: Linux 192.168.1.246 | 端口: API 8899 / Dashboard 5807
---
@@ -8,10 +8,10 @@
```bash
# 打开 Dashboard 看全局
http://192.168.1.246:5804
http://192.168.1.246:5807
# 命令行快速状态
ssh hmo@192.168.1.246 "curl -s http://127.0.0.1:5804/api/services | python3 -m json.tool | head -20"
ssh hmo@192.168.1.246 "curl -s http://127.0.0.1:5807/api/services | python3 -m json.tool | head -20"
```
---
@@ -71,7 +71,7 @@ ssh hmo@192.168.1.246 "cd ~/MoFin && git pull --rebase"
ssh hmo@192.168.1.246 "sudo systemctl restart mofin-dashboard"
# 3. 验证
ssh hmo@192.168.1.246 "curl -s http://127.0.0.1:5804/api/health"
ssh hmo@192.168.1.246 "curl -s http://127.0.0.1:5807/api/health"
```
---