feat(dashboard): deploy open-source Homepage (3002) and Glance (3003) connected to live telemetry

Browse Source
This commit is contained in:
Yin Kou committed 2026-11-06 23:20:47 +08:00
1 parent 33d188cad9
commit d2c5448565
9 files changed
+346 -1

No files matched your search

+122
View File
@@ -0,0 +1,122 @@
theme:
background-color: 240 10 4
primary-color: 210 90 65
contrast-multiplier: 1.2
pages:
- name: HomeLab 中控台
columns:
- size: small
widgets:
- type: clock
hour-format: 24h
timezones:
- timezone: Asia/Shanghai
label: 中国标准时间
- timezone: Asia/Singapore
label: 新加坡节点
- type: weather
location: Hangzhou, China
units: metric
hour-format: 24h
- type: docker-containers
title: OrbStack 运行容器
- size: full
widgets:
- type: search
search-engine: google
autofocus: false
- type: monitor
cache: 10s
title: 全屋核心服务矩阵 (点击直达)
sites:
- title: AGY 云端工作台 (24h Web 终端)
url: https://agy.961504.xyz
check-url: http://host.docker.internal:7681
icon: si:gnometerminal
- title: 极空间 Z4 私有云 (20TB 存储)
url: https://z4.home.961504.xyz:10443
check-url: http://host.docker.internal:3004/api/telemetry
icon: si:synology
- title: Vaultwarden 密码保险箱
url: https://vw.961504.xyz
check-url: http://host.docker.internal:8222
icon: si:bitwarden
- title: Mihomo 路由分流面板
url: https://clash.home.961504.xyz:10443/ui/
check-url: http://host.docker.internal:3004/api/telemetry
icon: si:cloudflare
- title: 小米主路由器后台
url: https://router.home.961504.xyz:10443
check-url: http://host.docker.internal:3004/api/telemetry
icon: si:xiaomi
- title: Uptime Kuma 外部哨兵
url: https://status.961504.xyz
check-url: https://status.961504.xyz
icon: si:uptimekuma
- type: custom-api
title: 全屋硬件与 AI 专线实时状态
cache: 3s
url: http://host.docker.internal:3004/api/telemetry
template: |
<div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;">
<div style="padding: 14px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);">
<div class="size-h4 color-primary">🖥️ M6 Mac mini</div>
<div class="size-h6 color-subdue" style="margin-top:4px;">IP: {{ .JSON.String "mini.ip" }} · UP {{ .JSON.String "mini.uptime" }}</div>
<div style="margin-top: 10px; font-size: 13px;">
<div>CPU 负载: <span class="color-highlight">{{ .JSON.Float "mini.cpu_pct" }}%</span></div>
<div>统一内存: <span class="color-highlight">{{ .JSON.Float "mini.mem_used_gb" }} / 24 GB ({{ .JSON.Float "mini.mem_pct" }}%)</span></div>
<div>NVMe 闪存: <span class="color-highlight">{{ .JSON.Float "mini.disk_used_gb" }} / {{ .JSON.Float "mini.disk_total_gb" }} GB</span></div>
</div>
</div>
<div style="padding: 14px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);">
<div class="size-h4 color-primary">💾 极空间 Z4 (20TB)</div>
<div class="size-h6 color-subdue" style="margin-top:4px;">IP: {{ .JSON.String "nas.ip" }} · SMB 已挂载 ~/nas</div>
<div style="margin-top: 10px; font-size: 13px;">
<div>剩余可用: <span class="color-positive">{{ .JSON.Float "nas.free_tb" }} TB</span></div>
<div>已用空间: <span class="color-highlight">{{ .JSON.Float "nas.used_tb" }} TB ({{ .JSON.Float "nas.pct" }}%)</span></div>
<div>最近灾备: <span class="color-highlight">{{ .JSON.String "nas.latest_backup" }}</span></div>
</div>
</div>
<div style="padding: 14px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);">
<div class="size-h4 color-primary">🛡️ AI 狮城专线 & 家宽</div>
<div class="size-h6 color-subdue" style="margin-top:4px;">{{ .JSON.String "network.ai_policy" }}</div>
<div style="margin-top: 10px; font-size: 13px;">
<div>AI 锁定出口: <span class="color-positive">{{ .JSON.String "network.sg_egress_ip" }}</span></div>
<div>狮城延迟: <span class="color-highlight">{{ .JSON.Int "network.sg_delay_ms" }} ms ({{ .JSON.String "network.sg_node" }})</span></div>
<div>家里联通公网: <span class="color-highlight">{{ .JSON.String "network.home_wan_ip" }}</span></div>
</div>
</div>
</div>
- type: bookmarks
groups:
- title: 443 免端口直达 (全网通用)
links:
- title: AGY 云端工作台
url: https://agy.961504.xyz
- title: Vaultwarden 密码库
url: https://vw.961504.xyz
- title: Uptime Kuma 监控
url: https://status.961504.xyz
- title: 10443 家宽公网直连
links:
- title: 极空间 Z4
url: https://z4.home.961504.xyz:10443
- title: AGY 工作台 (10443)
url: https://agy.home.961504.xyz:10443
- title: Mihomo 面板
url: https://clash.home.961504.xyz:10443/ui/
- title: 局域网原生极速 (192.168.31.x)
links:
- title: AGY 终端 (7681)
url: http://192.168.31.164:7681
- title: 极空间 (5055)
url: http://192.168.31.185:5055
- title: 小米路由器 (31.1)
url: http://192.168.31.1
+14
View File
@@ -0,0 +1,14 @@
services:
glance:
image: glanceapp/glance:latest
container_name: glance
restart: unless-stopped
ports:
- "3003:8080"
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- TZ=Asia/Shanghai
volumes:
- ./config:/app/config
- /var/run/docker.sock:/var/run/docker.sock:ro
+22
View File
@@ -0,0 +1,22 @@
---
- 开发与终端快捷入口:
- AGY 免端口直达 (443):
- abbr: AGY
href: https://agy.961504.xyz
- AGY 家宽直连 (10443):
- abbr: 10443
href: https://agy.home.961504.xyz:10443
- AGY 局域网直连:
- abbr: LAN
href: http://192.168.31.164:7681
- 存储与密码库备用入口:
- 极空间局域网直连:
- abbr: Z4
href: http://192.168.31.185:5055
- Vaultwarden 家宽直连:
- abbr: VW
href: https://vw.home.961504.xyz:10443
- Vaultwarden 管理后台:
- abbr: ADM
href: https://vw.961504.xyz/admin
+3
View File
@@ -0,0 +1,3 @@
---
my-docker:
socket: /var/run/docker.sock
+128
View File
@@ -0,0 +1,128 @@
---
- 全屋硬件与专线实时遥测:
- Apple M6 Mac mini:
icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/apple.png
href: https://agy.961504.xyz
description: 192.168.31.164 · 12核 M6 / 24GB / 512GB
siteMonitor: http://host.docker.internal:3004/api/telemetry
widget:
type: customapi
url: http://host.docker.internal:3004/api/telemetry
refreshInterval: 3000
mappings:
- field:
mini: cpu_pct
label: CPU 负载
format: percent
- field:
mini: mem_used_gb
label: 已用内存 (24GB)
format: float
suffix: " GB"
- field:
mini: disk_pct
label: SSD 占用
format: percent
- field:
mini: uptime
label: 运行时长
format: text
- 极空间 Z4 存储池 (20TB):
icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/synology-drive.png
href: https://z4.home.961504.xyz:10443
description: 192.168.31.185 · SMB 已挂载至 ~/nas
siteMonitor: http://192.168.31.185:5055
widget:
type: customapi
url: http://host.docker.internal:3004/api/telemetry
refreshInterval: 5000
mappings:
- field:
nas: free_tb
label: 剩余可用
format: float
suffix: " TB"
- field:
nas: used_tb
label: 已用空间
format: float
suffix: " TB"
- field:
nas: pct
label: 使用率
format: percent
- field:
nas: latest_backup
label: 最近灾备
format: text
- 狮城 AI 专线 & 家宽网关:
icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/tailscale.png
href: https://clash.home.961504.xyz:10443/ui/
description: AGY 锁定新加坡 Azure (104.43.105.243)
siteMonitor: http://192.168.31.1:9999
widget:
type: customapi
url: http://host.docker.internal:3004/api/telemetry
refreshInterval: 5000
mappings:
- field:
network: ai_policy
label: AI 路由策略
format: text
- field:
network: sg_egress_ip
label: 锁定出口 IP
format: text
- field:
network: sg_delay_ms
label: 狮城延迟
format: number
suffix: " ms"
- field:
network: home_wan_ip
label: 家宽公网 IP
format: text
- 核心工作台与私有云:
- AGY 云端工作台:
icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/iterm2.png
href: https://agy.961504.xyz
description: 24h 常驻 Web 终端 (ttyd + tmux · 关窗不断连)
siteMonitor: http://host.docker.internal:7681
- 极空间 Z4 私有云:
icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/plex.png
href: https://z4.home.961504.xyz:10443
description: 20TB 极影视蓝光影院 / 手机相册备份 / 文件管理
siteMonitor: http://192.168.31.185:5055
- Vaultwarden 密码库:
icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/vaultwarden.png
href: https://vw.961504.xyz
description: Bitwarden 自托管私人密码保险箱 (每日自动备份至极空间)
server: my-docker
container: vaultwarden
- 网络路由与外部哨兵:
- Mihomo 路由分流面板:
icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/clash.png
href: https://clash.home.961504.xyz:10443/ui/
description: 小米路由器 ShellCrash 透明网关控制台
siteMonitor: http://192.168.31.1:9999
widget:
type: clash
url: http://192.168.31.1:9999
- 小米主路由器后台:
icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/openwrt.png
href: https://router.home.961504.xyz:10443
description: 192.168.31.1 · PPPoE 拨号 / DHCP / 端口转发
siteMonitor: http://192.168.31.1
- Uptime Kuma 外部哨兵:
icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/uptime-kuma.png
href: https://status.961504.xyz
description: 新加坡 Azure 24h 外部断网监控哨兵
siteMonitor: https://status.961504.xyz
+20
View File
@@ -0,0 +1,20 @@
---
title: HomeLab
favicon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/apple.png
theme: dark
color: zinc
headerStyle: clean
statusStyle: dot
hideVersion: true
useEqualHeights: true
layout:
全屋硬件与专线实时遥测:
style: row
columns: 3
核心工作台与私有云:
style: row
columns: 3
网络路由与外部哨兵:
style: row
columns: 3
+21
View File
@@ -0,0 +1,21 @@
---
- datetime:
text_size: xl
format:
dateStyle: medium
timeStyle: short
hourCycle: h23
- openmeteo:
label: 实时天气
latitude: 30.2741
longitude: 120.1551
timezone: Asia/Shanghai
units: metric
cache: 5
- search:
provider: google
focus: false
showSearchSuggestions: true
target: _blank
+15
View File
@@ -0,0 +1,15 @@
services:
homepage:
image: ghcr.io/gethomepage/homepage:latest
container_name: homepage
restart: unless-stopped
ports:
- "3002:3000"
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- HOMEPAGE_ALLOWED_HOSTS=*
- TZ=Asia/Shanghai
volumes:
- ./config:/app/config
- /var/run/docker.sock:/var/run/docker.sock:ro
+1 -1
View File
@@ -15,7 +15,7 @@ from concurrent.futures import ThreadPoolExecutor
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
from pathlib import Path
PORT = int(os.environ.get("PORT", "3002"))
PORT = int(os.environ.get("PORT", "3004"))
BASE_DIR = Path(__file__).resolve().parent
INDEX_FILE = BASE_DIR / "index.html"