docs: add bilingual project documentation
This commit is contained in:
@@ -1,48 +1,85 @@
|
||||
# PIGWay Device Console
|
||||
|
||||
独立的多设备管理中心,可运行在 NAS、服务器或其他能访问设备 API 的主机上。所有设备都显式登记,没有默认“本机”。不采集所在主机状态,不控制硬件,也不依赖 systemd。
|
||||
## 中文
|
||||
|
||||
## Docker Compose
|
||||
独立的多设备管理中心,可运行在 NAS、服务器或其他能访问设备 API 的主机上。所有设备都需要显式登记;Console 不采集所在主机状态,不控制硬件,也不依赖 Agent 或插件持续运行。
|
||||
|
||||
### 安装
|
||||
|
||||
Docker Compose:
|
||||
|
||||
```bash
|
||||
docker compose up -d --build
|
||||
docker compose exec manager cat /data/manager.token
|
||||
```
|
||||
|
||||
打开 `http://管理中心地址:6001`,输入管理中心令牌。在“机器管理”中添加设备地址及该设备的 API 令牌。管理中心令牌与设备令牌不同;设备令牌仅保存在服务端的数据卷,列表不会返回令牌。管理中心登录令牌仅保存在当前浏览器会话中。
|
||||
|
||||
用 `PIGWAY_PORT=6002 docker compose up -d --build` 更改外部端口。数据卷保存设备登记与令牌,应限制备份的访问权限。日志按需查询设备 journal,不建立日志数据库。
|
||||
|
||||
## 直接运行(仅 Python 标准库)
|
||||
直接运行(仅使用 Python 标准库):
|
||||
|
||||
```bash
|
||||
PIGWAY_DATA="$PWD/.data" PIGWAY_PORT=6001 python3 app/server.py
|
||||
cat .data/manager.token
|
||||
```
|
||||
|
||||
不需要 root、I2C、监控 Agent 或硬件插件。远端部署需要到设备 API 的网络可达性;跨公网通过 HTTPS 反向代理或 VPN,不使用明文 HTTP 传输令牌。HTTP 客户端拒绝重定向,避免把设备凭据转发到其他地址。
|
||||
|
||||
## 可选 systemd 安装
|
||||
可选 systemd 安装:
|
||||
|
||||
```bash
|
||||
sudo ./install.sh --port 6001
|
||||
sudo cat /var/lib/pigway-web-manager/manager.token
|
||||
```
|
||||
|
||||
独立服务 `pigway-web-manager.service`,不启动任何 Agent 或插件。
|
||||
打开 `http://管理中心地址:6001`,输入管理中心令牌,然后在“机器管理”中登记设备地址和该设备的 API 令牌。用 `PIGWAY_PORT=6002 docker compose up -d --build` 可修改外部端口。
|
||||
|
||||
## 功能
|
||||
设备令牌只保存在服务端数据卷,列表不会返回;管理中心登录令牌只保存在当前浏览器会话。跨公网部署应使用 HTTPS 反向代理或 VPN。日志按需查询设备 journal,不建立额外日志数据库。
|
||||
|
||||
- 统一设备列表,添加、更新地址/令牌、移除及连接检测。
|
||||
- 多机状态卡片、按设备查询 journal、配置与插件管理。
|
||||
- 按层级选择配置项、全选/反选、批量同步,逐设备报告结果。
|
||||
- 中英文、自动/浅色/深色主题。
|
||||
- 单台离线不会停止其他设备查询;日志查询失败会提示部分结果。
|
||||
### 功能与边界
|
||||
|
||||
最多登记32台设备;并发查询最多8台。单设备单次日志聚合上限50000条,超出时明确提示缩小日期范围,不静默截断。
|
||||
- 设备登记、连接检测、多机状态卡片和 journal 查询。
|
||||
- 单机配置、服务及插件管理,以及按配置层级选择的批量同步。
|
||||
- 中英文界面和自动、浅色、深色主题。
|
||||
- 最多登记 32 台设备,并发查询最多 8 台;单台离线不会阻塞其他设备。
|
||||
- 单设备单次日志聚合上限 50,000 条,超出时明确提示缩小日期范围。
|
||||
- Console 停止或卸载不会停止任何设备上的 Agent 或硬件插件。
|
||||
|
||||
## 三个项目
|
||||
相关项目:[PIGWay Device Agent](https://tea.pigway.com/way/pigway-device-agent) · [PIGWay Yahboom Cooling HAT](https://tea.pigway.com/way/pigway-yahboom-cooling-hat)
|
||||
|
||||
- [本地监控服务](https://tea.pigway.com/way/pigway-device-agent):本机监控、告警、日志与可选 API,默认不开启 API,无 Web。
|
||||
- [硬件插件](https://tea.pigway.com/way/pigway-yahboom-cooling-hat):独立显示、温控和灯效,可选本机接入,默认关闭。
|
||||
- 管理中心停止或卸载,不会停止任何设备上的服务或插件。
|
||||
## English
|
||||
|
||||
PIGWay Device Console is an independent multi-device management application for a NAS, server, or any host that can reach the device APIs. Every device is registered explicitly. The Console does not monitor its own host, control hardware directly, or require an Agent or plugin to remain operational.
|
||||
|
||||
### Installation
|
||||
|
||||
Docker Compose:
|
||||
|
||||
```bash
|
||||
docker compose up -d --build
|
||||
docker compose exec manager cat /data/manager.token
|
||||
```
|
||||
|
||||
Direct execution using only the Python standard library:
|
||||
|
||||
```bash
|
||||
PIGWAY_DATA="$PWD/.data" PIGWAY_PORT=6001 python3 app/server.py
|
||||
cat .data/manager.token
|
||||
```
|
||||
|
||||
Optional systemd installation:
|
||||
|
||||
```bash
|
||||
sudo ./install.sh --port 6001
|
||||
sudo cat /var/lib/pigway-web-manager/manager.token
|
||||
```
|
||||
|
||||
Open `http://console-host:6001`, enter the Console token, and register each device URL and API token under Machine Management. Use `PIGWAY_PORT=6002 docker compose up -d --build` to change the published port.
|
||||
|
||||
Device tokens remain in the server-side data volume and are never returned by list APIs. The Console login token is kept only in the current browser session. Use an HTTPS reverse proxy or VPN across untrusted networks. Logs are queried from each device journal on demand; the Console does not create another log database.
|
||||
|
||||
### Features and boundaries
|
||||
|
||||
- Device registration, connectivity checks, multi-device status cards, and journal queries.
|
||||
- Per-device configuration, service and plugin management, plus hierarchical batch configuration sync.
|
||||
- Chinese and English interfaces with automatic, light, and dark themes.
|
||||
- Up to 32 registered devices and 8 concurrent queries; one offline device does not block the others.
|
||||
- Up to 50,000 journal entries per device per query, with an explicit warning when the date range must be narrowed.
|
||||
- Stopping or uninstalling the Console never stops a Device Agent or hardware plugin.
|
||||
|
||||
Related projects: [PIGWay Device Agent](https://tea.pigway.com/way/pigway-device-agent) · [PIGWay Yahboom Cooling HAT](https://tea.pigway.com/way/pigway-yahboom-cooling-hat)
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
535a162cf05549e3089c61b1850b25627b48bf606548a41e4c10bf461f5ccf97 .dockerignore
|
||||
62dbe9a72fc425104d5dfe5c63d089cd7785e49ca94386463aa9372dee48163f .gitignore
|
||||
e3d6adb86d19118a02a43aeb929e8fa8ca486e0721586652d908c1822f4a4dcc Dockerfile
|
||||
9281396fa236a4cc3ab8a8b5672b3ef6cb158efaf0054b239ec0e8d87bed052e README.md
|
||||
097b368200551f5196585a313ae36618e68bb0140f7e045772fe373172089bdb README.md
|
||||
3c1531ef7c99dc3672d091715c88a0803eb117ad21601200a9b5753bf818fc76 app/server.py
|
||||
d3cdab188f694f7216d3bb361394a2e160a8b3d425c1a904ede7372698582a3e compose.yaml
|
||||
148e0523932cc4e65537ec2cff38ee93fda1a9447c411ae410cbec8b7b93d6bb install.sh
|
||||
|
||||
Reference in New Issue
Block a user