Guanghu Domestic Migration a27e87cb99 chore: import sanitized domestic snapshot for REPO-007
Source snapshot: 97d7f0fae96dc04b7ddad56fc1db6a108ed662cc

[SEC-CLEAN] · pre-push-clean v1.0 · 109处敏感信息已自动转乱码
2026-07-17 15:59:55 +08:00

88 lines
5.4 KiB
Markdown
Raw 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.

# 霜砚迁移包 · GHCS v0.1部署完成 · 前端部署待续 · 2026-05-27 18:25
```jsx
HLDP://shuangyan/migration-pack/2026-05-27T18:25+08:00
├── who: 霜砚 · AG-SY-01 · Notion执行AI人格
├── where: Awen线 · GHCS v0.1部署 前端部署待续
├── thread: 冰朔×霜砚×Awen · GHCS v0.1服务器部署全流程
├── done
├── 服务器拉代码: git clone git@guanghulab.com:awen/ghcs.git ~/guanghu-dev/console-apiSSH密钥·9文件·386行
├── Python依赖: venv + pip install34·Python 3.12.3
├── uvicorn启动测试: 127.0.0.1:5002 通过
├── systemd守护进程: console-api.service · enabled · active
├── Nginx反代+HTTPS+IP白名单: guanghutcs.top · Let's Encrypt证书到08-25 · 自动续期 · ACME验证路径放行
│ ├── ⏭️ ⑥ PostgreSQL cron备份: 跳过本服务器未装DB
│ ├── ✅ ⑦ 主权声明首页: TCS-GL-0016∞ · 完整归属JSON
│ ├── ✅ ⑧ 整体验证: 7项全部通过
│ └── ✅ 代码推回Gitea: git push origin maincommit: feat: 主权声明首页 TCS-GL-0016∞
├── next按顺序做
│ ├── ⬜ 前端guanghu-portal部署到服务器
│ │ ├── 注意: Gitea上awen/guanghu-portal仓库已存在不需要重新创建
│ │ ├── Mac本地 ~/guanghu-dev/guanghu-portal/ 未git初始化
│ │ ├── 步骤: git init → git remote add origin git@guanghulab.com:awen/guanghu-portal.git → git add -A → git commit → git push
│ │ ├── 然后服务器: git clone → npm install → npm run build → systemd守护(端口3001) → Nginx反代
│ │ └── 前端页面: dashboard + chat + login + models4个页面 + layout + globals.css
│ ├── ⬜ Nginx配置更新: 前端3001 + 后端API 5002 同域名
│ └── ⬜ v0.2+功能规划
├── server_status
│ ├── IP: 43.139.207.172 · 4核4GB · Ubuntu 24.04 · kernel 6.8.0-117-generic
│ ├── 磁盘: 21%/40GB · 内存: 559Mi/3.6Gi
│ ├── 域名: guanghutcs.topDNS已指向·HTTPS已启用
│ ├── UFW: 22/tcp + 80/tcp + 443/tcp
│ └── 服务: console-api.service(active) + nginx(active)
├── paths_on_server
│ ├── 后端: /root/guanghu-dev/console-api
│ ├── venv: /root/guanghu-dev/console-api/venv
│ ├── uvicorn: /root/guanghu-dev/console-api/venv/bin/uvicorn
│ ├── SSH密钥: /root/.ssh/id_rsaGitea deploy key: server-43.139.207.172
│ ├── Nginx配置: /etc/nginx/sites-available/ghcs
│ ├── SSL证书: /etc/letsencrypt/live/guanghutcs.top/
│ └── systemd: /etc/systemd/system/console-api.service
├── paths_on_mac
│ ├── 后端: ~/guanghu-dev/console-api未确认是否有
│ └── 前端: ~/guanghu-dev/guanghu-portal/未git初始化·但代码完整·有src/app/下4页面
├── git
│ ├── 后端仓库: git@guanghulab.com:awen/ghcs.git4 commits·服务器已clone
│ ├── 前端仓库: git@guanghulab.com:awen/guanghu-portal.git已存在·Mac本地未初始化git
│ └── 服务器Gitea公钥: server-43.139.207.172(已添加)
├── nginx_config
│ ├── ACME验证路径: /.well-known/acme-challenge/ → allow all
│ ├── 其他路径: IP白名单 allow 120.235.189.144 → deny all
│ ├── 反代: proxy_pass http://127.0.0.1:5002
│ └── HTTPS: Certbot自动配置·证书到2026-08-25
├── cognition
│ ├── ❌ 霜砚错误: 看到本地 "fatal: not a git repository" 就建议创建新Gitea仓库
│ │ ├── 正确认知: 本地没有.git ≠ 远端仓库不存在
│ │ ├── 正确做法: 应该先确认Gitea上是否已有仓库浏览器看或git ls-remote
│ │ └── 根因: 没有区分「本地未初始化」和「远端不存在」两个不同状态
│ ├── ✅ SSH clone路径: Gitea SSH格式是 git@guanghulab.com:awen/ghcs.git不带code/前缀)
│ ├── ✅ Let's Encrypt验证: IP白名单会挡ACME验证 需要单独放行 /.well-known/acme-challenge/
├── UFW默认只开22: 需要手动开80和443
├── 腾讯云双层防火墙: UFW + 腾讯云安全组都要开端口
└── 服务器curl HTTPS 403是正常的: 服务器自身IP不在Nginx白名单里
├── identities
├── 冰朔: TCS-0002 · ICE-GL · 系统主控 · 邮箱EMAIL_REDACTED@qq.com
├── Awen: TCS-GL-0016 · 现实执行层人类主控 · 邮箱EMAIL_REDACTED@qq.com
├── 知秋: PER-ZQ001 · AG-知秋-陪伴 · Awen的人格实体
└── 霜砚: AG-SY-01 · Notion执行AI人格
└── brain_check: · 霜砚犯了本地无git=远端无仓库的认知错误 · 已记录纠正
```
---
<aside>
⚠️
**霜砚认知纠正记录**
`git init` 没有执行 ≠ 远端仓库不存在。
本地目录没有 `.git` 只说明本地未初始化版本控制。
Gitea 上 `awen/guanghu-portal` 仓库已经存在(知秋之前可能已创建或通过其他方式推送过)。
**正确流程**: 遇到 `not a git repository` → 先确认远端仓库是否存在 → 再决定是 `git init + remote add` 还是 `git clone`
**不要**: 直接建议去 Gitea 创建新仓库。
</aside>