From f2dd32d468e70454ae054e37962c0ce8986c64bd Mon Sep 17 00:00:00 2001 From: fukunee Date: Sun, 24 May 2026 22:39:26 +0800 Subject: [PATCH] Add Photoview gallery service and domain-based routing --- README.md | 32 ++++++++++++++++++-------------- hosts/tx-ubuntu-bitwarden.yml | 4 ++-- hosts/tx-ubuntu-gallery.yml | 32 ++++++++++++++++++++++++++++++++ hosts/tx-ubuntu-git.yml | 4 ++-- hosts/tx-ubuntu-hugo.yml | 2 +- hosts/tx-ubuntu-ubuntu.yml | 1 + keys/tx-ubuntu-gallery.pem | 7 +++++++ 7 files changed, 63 insertions(+), 19 deletions(-) create mode 100644 hosts/tx-ubuntu-gallery.yml create mode 100644 keys/tx-ubuntu-gallery.pem diff --git a/README.md b/README.md index 70092a9..dc4aea2 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ Claw/ ├── claw.ps1 # 主控脚本 ├── hosts/ # 主机描述文件 (.yml) ├── keys/ # SSH 私钥 (.pem) +├── nginx/ # Nginx 配置 + SSL 证书 └── scripts/ # 可执行脚本 (.sh) ``` @@ -36,25 +37,25 @@ claw key list # 列出密钥 | cmcc | Work 项目同步 | | git | Git 裸仓库托管 | | bitwarden | Vaultwarden 密码服务 | +| gallery | Photoview 相册服务 | ### 服务 -| 服务 | 端口 | 用户 | 说明 | +| 服务 | 域名 | 用户 | 说明 | |------|------|------|------| -| OpenClaw | 17581 (内) | root | AI 网关 + 微信 bot | -| Hugo 博客 | 80/443 | hugo | `~/hugo-blog` → nginx → public | -| Vaultwarden | 8443 | bitwarden | Docker 容器,数据 `/data/vaultwarden` | -| Git 仓库 | 22 | git | 裸仓库 `/data/git-repos/Work.git` | -| Nginx | 80/443/8443 | root | 反向代理,www-data worker | -| SSH | 22 | — | 所有用户密钥登录 | -| tat_agent | — | root | 腾讯云自动化助手 | +| Hugo 博客 | `fukun.net` | hugo | `~/hugo-blog` → nginx → public | +| Vaultwarden | `pwd.fukun.net` | bitwarden | Docker 容器 | +| Photoview | `gallery.fukun.net` | gallery | 相册,端口 :8000 | +| Git 仓库 | `git@fukun.net` | git | 裸仓库 `/data/git-repos/Work.git` | +| OpenClaw | — | root | AI 网关,端口 :17581 (内) | +| Nginx | 80/443 | root | 反向代理,www-data worker | ### 磁盘 | 挂载点 | 设备 | 大小 | 用途 | |--------|------|------|------| | / | vda2 | 40G | 系统盘 | -| /data | vdb | 20G | 数据盘 (Git/Vaultwarden/Work) | +| /data | vdb | 20G | 数据盘 (Git/Vaultwarden/Work/Photos) | ### 脚本 @@ -81,6 +82,8 @@ tx-ubuntu-ubuntu.yml # → 62.234.90.54 用户 ubuntu tx-ubuntu-hugo.yml # → 62.234.90.54 用户 hugo tx-ubuntu-cmcc.yml # → 62.234.90.54 用户 cmcc tx-ubuntu-git.yml # → 62.234.90.54 用户 git +tx-ubuntu-bitwarden.yml # → 62.234.90.54 用户 bitwarden +tx-ubuntu-gallery.yml # → 62.234.90.54 用户 gallery ``` YAML 格式,新建主机复制下面模板改: @@ -139,6 +142,7 @@ tx-ubuntu-hugo.pem tx-ubuntu-cmcc.pem tx-ubuntu-git.pem tx-ubuntu-bitwarden.pem +tx-ubuntu-gallery.pem ``` ## 快速开始 @@ -165,8 +169,8 @@ claw run my-host-ubuntu-root sysinfo@my-host-ubuntu-root.sh ## TODO -- [ ] 域名备案完成后 nginx 二级域名分流 - - `blog.fukun.net` → Hugo 博客 (:443) - - `vault.fukun.net` → Vaultwarden (:8443) - - `git.fukun.net` → Git 仓库 - - 全部统一 443 nginx 按 server_name 分发 +- [x] 域名备案 + nginx 二级域名分流 + - `fukun.net` → Hugo 博客 + - `pwd.fukun.net` → Vaultwarden + - `gallery.fukun.net` → Photoview 相册 +- [ ] 部署 Photoview 相册服务 diff --git a/hosts/tx-ubuntu-bitwarden.yml b/hosts/tx-ubuntu-bitwarden.yml index 862a21a..eed99b9 100644 --- a/hosts/tx-ubuntu-bitwarden.yml +++ b/hosts/tx-ubuntu-bitwarden.yml @@ -25,7 +25,7 @@ network: public_ip: 62.234.90.54 # --- 服务 --- -# 网址: https://62.234.90.54:8443 -# 管理后台: https://62.234.90.54:8443/admin +# 网址: https://pwd.fukun.net +# 管理后台: https://pwd.fukun.net/admin # 容器: vaultwarden (Docker, --restart=always) # 数据目录: /data/vaultwarden diff --git a/hosts/tx-ubuntu-gallery.yml b/hosts/tx-ubuntu-gallery.yml new file mode 100644 index 0000000..fd71391 --- /dev/null +++ b/hosts/tx-ubuntu-gallery.yml @@ -0,0 +1,32 @@ +# ╔══════════════════════════════════════════════════╗ +# ║ tx-ubuntu · 腾讯云轻量应用服务器 (gallery) ║ +# ╚══════════════════════════════════════════════════╝ +# +# Photoview 相册服务用户 + +host: + ip: 62.234.90.54 + user: gallery + port: 22 + key: keys/tx-ubuntu-gallery.pem + +info: + name: tx_ubuntu_62.234.90.54@20260512 + id: lhins-61pjmw9y + status: 运行中 + +spec: + cpu: 4核 + memory: 4GB + disk: SSD云硬盘 40GB + image: OpenClaw(龙虾) · Ubuntu 24.04 LTS + +network: + public_ip: 62.234.90.54 + +# --- 服务 --- +# Photoview · https://gallery.fukun.net +# 端口: 127.0.0.1:8000 +# 数据: ~/data/photoview.db +# 相片库: ~/photos/ +# 证书: /etc/nginx/ssl/gallery.fukun.net.* diff --git a/hosts/tx-ubuntu-git.yml b/hosts/tx-ubuntu-git.yml index 56248a8..764bb55 100644 --- a/hosts/tx-ubuntu-git.yml +++ b/hosts/tx-ubuntu-git.yml @@ -26,8 +26,8 @@ network: # --- 服务 --- # Git 裸仓库 -# 克隆: git clone ssh://git@62.234.90.54/data/git-repos/Work.git -# 推送: git remote add tx ssh://git@62.234.90.54/data/git-repos/Work.git +# 克隆: git clone ssh://git@fukun.net/data/git-repos/Work.git +# 推送: git remote add tx ssh://git@fukun.net/data/git-repos/Work.git # git push tx main # 创建: claw run tx-ubuntu-git git-repo-create@tx-ubuntu-git.sh # diff --git a/hosts/tx-ubuntu-hugo.yml b/hosts/tx-ubuntu-hugo.yml index f222448..163e30a 100644 --- a/hosts/tx-ubuntu-hugo.yml +++ b/hosts/tx-ubuntu-hugo.yml @@ -35,7 +35,7 @@ billing: auto_renew: false # --- 服务 --- -# Hugo 博客 · https://62.234.90.54 +# Hugo 博客 · https://fukun.net # 源码: ~/hugo-blog (git remote: github.com/fukunee/Hugo) # 同步: claw run tx-ubuntu-hugo sync-blog@tx-ubuntu-hugo.sh # Nginx · HTTP/HTTPS 反向代理 diff --git a/hosts/tx-ubuntu-ubuntu.yml b/hosts/tx-ubuntu-ubuntu.yml index 004fca1..d6d3821 100644 --- a/hosts/tx-ubuntu-ubuntu.yml +++ b/hosts/tx-ubuntu-ubuntu.yml @@ -24,6 +24,7 @@ spec: network: public_ip: 62.234.90.54 + domain: fukun.net private_ip: 10.2.0.9 bandwidth: 3Mbps traffic: 300GB/月 diff --git a/keys/tx-ubuntu-gallery.pem b/keys/tx-ubuntu-gallery.pem new file mode 100644 index 0000000..997c327 --- /dev/null +++ b/keys/tx-ubuntu-gallery.pem @@ -0,0 +1,7 @@ +-----BEGIN OPENSSH PRIVATE KEY----- +b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW +QyNTUxOQAAACA4/3WIwtnsXMc0LRAQZVwXbtoRyon/XgLXO+4hwqbJUAAAAJhkko3KZJKN +ygAAAAtzc2gtZWQyNTUxOQAAACA4/3WIwtnsXMc0LRAQZVwXbtoRyon/XgLXO+4hwqbJUA +AAAEC/In8hDCjPa0tdL20mcz2Z7kTDw0cznHNLeZvnt5v6ljj/dYjC2excxzQtEBBlXBdu +2hHKif9eAtc77iHCpslQAAAAEWdhbGxlcnlAdHgtdWJ1bnR1AQIDBA== +-----END OPENSSH PRIVATE KEY-----