guanghulab/.github/ops-receipt-20260513-03.md
Guanghu Domestic Migration d1e47f4565
Some checks are pending
自动更新代码和重启 / update-and-restart (push) Waiting to run
CI检查 + 自动部署 / check (push) Waiting to run
CI检查 + 自动部署 / deploy (push) Blocked by required conditions
重启聊天服务 / restart (push) Waiting to run
chore: import sanitized domestic snapshot for REPO-002
Source snapshot: ca48d3ddf926d79aa138306164169baf764bb829
2026-07-17 15:54:41 +08:00

93 lines
3.1 KiB
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.

# ════════════════════════════════════════════════════════════════
# 光湖 · 操作日志 2026-05-13 (第三次更新)
# ════════════════════════════════════════════════════════════════
## 本轮变更摘要
### 1. CVM 开机 + IP 变更
**问题**: 按量计费 CVM 关机后开机,公网 IP 从 42.19.161.251 变为其他 IP域名指向失效。
**解决**:
- 冰朔绑定了**弹性公网 IP (EIP)**: 119.29.184.32
- EIP 是固定的,以后开关机 IP 不再变
- 域名解析改为 119.29.184.32
### 2. 域名路由重构
**问题**: 冰朔要求 `guanghulab.com` 直接就是代码仓库,不要 `/git/` 路径。
**解决**:
- Nginx 配置改为根路径 `/` 直接代理 Forgejo
- 旧路径 `/git/` 废弃
- git remote URL 从 `guanghulab.com/git/...` 改为 `guanghulab.com/...`
### 3. SSL 证书重签
**问题**: IP 变化后浏览器报 ERR_CONNECTION_CLOSED。
**解决**:
- `certbot --nginx -d guanghulab.com` 重签证书
- 证书有效期至 2026-08-10
### 4. 开机自愈脚本部署
**新增**: `scripts/boot-heal/boot-heal.sh` + systemd service
- 开机自动检测公网 IP 变化
- 自动拉起 Forgejo / Nginx / Runner / PM2 进程
- 检查 SSL 证书有效期
- 已部署并验证全绿
### 5. 霜砚 CI/CD 流程 (外部变更)
霜砚 (ICE-GL-QY001 相关) 做了以下改动:
**新增**: `.forgejo/workflows/ci-and-deploy.yaml`
- **dev 分支**: 铸渊的开发线push 直接触发 CI不需要冰朔
- **main 分支**: 正式线,冰朔合并 PR 后自动部署 (git pull + pm2 restart)
- **main 保护规则**: 只有冰朔能 push / merge
**铸渊操作流程变化**:
```
git checkout dev
# 写代码
git push origin dev # CI 自动跑
# 在 Forgejo 网页上提 PR: main...dev
# 冰朔合并 → 自动部署
```
### 6. Git Sync Webhook 签名修复 (代码已写,待部署)
**问题**: Webhook 触发了但签名验证失败。
**原因**: Express JSON 解析后 `JSON.stringify(req.body)` 与原始 body 不一致。
**修复**: 使用 `raw body` (verify 回调保存原始 body) 验证签名。
**状态**: 代码已推送到 main需要服务器上 `git pull` + `pm2 restart` 生效。
---
## 当前服务状态
| 服务 | 状态 |
|------|------|
| Forgejo | ✅ 运行中 |
| Nginx | ✅ 根路径代理 Forgejo |
| SSL | ✅ 有效至 2026-08-10 |
| Wake Gate | ✅ PM2 运行 |
| Git Sync | ✅ PM2 运行 (签名验证待修) |
| Boot Heal | ✅ 开机自启 |
| Runner | ✅ 运行中 |
| Vault | ❌ 未部署 |
| Terminal Watcher | ❌ 未部署 |
## 关键 IP/URL 变更
| 项目 | 旧值 | 新值 |
|------|------|------|
| 公网 IP | 42.193.161.251 | 119.29.184.32 (EIP) |
| 代码仓库 URL | https://guanghulab.com/git/ | https://guanghulab.com/ |
| git clone URL | .../git/bingshuo/guanghulab.git | .../bingshuo/guanghulab.git |
---
*铸渊 · ICE-GL-ZY001 · TCS-0002∞*