From c25a68e5e38cd30a2f203ca4cbacb2145bb3052c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 29 Mar 2026 11:19:27 +0000 Subject: [PATCH] =?UTF-8?q?SY-CMD-SVR-013:=20=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E8=BF=81=E7=A7=BB=20=E9=A6=99=E6=B8=AF(150.109.76.244/ZY-SVR-0?= =?UTF-8?q?01)=20=E2=86=92=20=E6=96=B0=E5=8A=A0=E5=9D=A1(43.134.16.246/ZY-?= =?UTF-8?q?SVR-002)=20=E2=80=94=202=E6=A0=B88GB/80GB=20SSD/Ubuntu=2024.04?= =?UTF-8?q?=20LTS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Agent-Logs-Url: https://github.com/qinfendebingshuo/guanghulab/sessions/79893309-cdd7-4217-b8f2-ed5bcac25ff1 Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- .github/workflows/deploy-to-server.yml | 2 +- scripts/deploy-sandbox-server.sh | 2 +- scripts/zhuyuan-server-health.js | 8 ++++---- server/app/server.js | 16 ++++++++-------- server/architecture.md | 2 +- server/migration-plan.md | 8 ++++---- server/scripts/health-check.sh | 2 +- server/setup/zhuyuan-server-init.sh | 16 ++++++++-------- 8 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/deploy-to-server.yml b/.github/workflows/deploy-to-server.yml index 659bfd0d..23ee5957 100644 --- a/.github/workflows/deploy-to-server.yml +++ b/.github/workflows/deploy-to-server.yml @@ -106,7 +106,7 @@ jobs: echo "❌ 未配置服务器部署密钥" echo "" echo "请在仓库 Settings → Secrets and variables → Actions 中添加:" - echo " ZY_SERVER_HOST — 铸渊主权服务器 IP (150.109.76.244)" + echo " ZY_SERVER_HOST — 铸渊主权服务器 IP (43.134.16.246)" echo " ZY_SERVER_USER — SSH 用户名" echo " ZY_SERVER_KEY — SSH 私钥(完整 PEM 内容)" echo " ZY_SERVER_PATH — 部署根目录 (/opt/zhuyuan)" diff --git a/scripts/deploy-sandbox-server.sh b/scripts/deploy-sandbox-server.sh index 8f8542af..ddf60f96 100755 --- a/scripts/deploy-sandbox-server.sh +++ b/scripts/deploy-sandbox-server.sh @@ -24,7 +24,7 @@ echo "" echo "===== S2-1 · 前置验证 =====" -# DNS 检查 — 铸渊主权服务器 ZY-SVR-001 +# DNS 检查 — 铸渊主权服务器 ZY-SVR-002 DNS=$(dig +short dev-004.guanghulab.com A 2>/dev/null || echo "") if [ "$DNS" = "43.134.16.246" ]; then echo "✅ DNS OK ($DNS) — 铸渊主权服务器" diff --git a/scripts/zhuyuan-server-health.js b/scripts/zhuyuan-server-health.js index ae61d641..4eb1ad88 100644 --- a/scripts/zhuyuan-server-health.js +++ b/scripts/zhuyuan-server-health.js @@ -59,7 +59,7 @@ async function checkServerHealth() { const profile = loadServerProfile(); if (!profile) { return { - server: 'ZY-SVR-001', + server: 'ZY-SVR-002', status: 'error', message: 'server/zhuyuan-server-profile.json 未找到', timestamp: new Date().toISOString() @@ -68,7 +68,7 @@ async function checkServerHealth() { const ip = profile.hardware.ipv4; const report = { - server: 'ZY-SVR-001', + server: 'ZY-SVR-002', ip, timestamp: new Date().toISOString(), checks: {} @@ -137,7 +137,7 @@ function updateSystemHealth(report) { try { const health = JSON.parse(fs.readFileSync(SYSTEM_HEALTH, 'utf8')); health.sovereign_server = { - code: 'ZY-SVR-001', + code: 'ZY-SVR-002', ip: report.ip, status: report.summary.overall, last_check: report.timestamp, @@ -169,7 +169,7 @@ async function main() { } else { console.log(''); console.log('═══════════════════════════════════════════════════════════'); - console.log(' 🏛️ 铸渊主权服务器健康报告 · ZY-SVR-001'); + console.log(' 🏛️ 铸渊主权服务器健康报告 · ZY-SVR-002'); console.log('═══════════════════════════════════════════════════════════'); console.log(''); console.log(` 服务器: ${report.ip}`); diff --git a/server/app/server.js b/server/app/server.js index 5c06e646..17bf3de1 100644 --- a/server/app/server.js +++ b/server/app/server.js @@ -4,7 +4,7 @@ * 🏛️ 铸渊主权服务器 · Zhuyuan Sovereign Server * ═══════════════════════════════════════════════════════════ * - * 编号: ZY-SVR-001 + * 编号: ZY-SVR-002 * 端口: 3800 * 守护: 铸渊 · ICE-GL-ZY001 * 版权: 国作登字-2026-A-00037559 @@ -72,7 +72,7 @@ app.use((req, res, next) => { // ─── 健康检查 ─── app.get('/api/health', (_req, res) => { const health = { - server: 'ZY-SVR-001', + server: 'ZY-SVR-002', identity: '铸渊 · ICE-GL-ZY001', status: 'alive', timestamp: new Date().toISOString(), @@ -113,7 +113,7 @@ app.get('/api/brain', (_req, res) => { } res.json({ - server: 'ZY-SVR-001', + server: 'ZY-SVR-002', brain_dir: BRAIN_DIR, files_present: Object.entries(brainState) .filter(([, v]) => v !== null).length, @@ -130,7 +130,7 @@ app.post('/api/brain/health', (req, res) => { try { const healthPath = path.join(BRAIN_DIR, 'health.json'); const health = { - server: 'ZY-SVR-001', + server: 'ZY-SVR-002', status: 'running', last_check: new Date().toISOString(), services: { @@ -286,7 +286,7 @@ app.get('/api/sites', (_req, res) => { } res.json({ - server: 'ZY-SVR-001', + server: 'ZY-SVR-002', architecture: '双域名架构', sites, last_promote: lastPromote, @@ -431,7 +431,7 @@ app.post('/api/sites/rollback', (req, res) => { app.get('/', (_req, res) => { res.json({ name: '铸渊主权服务器', - id: 'ZY-SVR-001', + id: 'ZY-SVR-002', identity: '铸渊 · ICE-GL-ZY001', role: '光湖语言系统 · 唯一现实执行操作层', sovereign: 'TCS-0002∞ · 冰朔', @@ -467,7 +467,7 @@ function safeExec(cmd) { app.listen(PORT, () => { console.log(` ═══════════════════════════════════════════════════════════ - 🏛️ 铸渊主权服务器已启动 · ZY-SVR-001 + 🏛️ 铸渊主权服务器已启动 · ZY-SVR-002 端口: ${PORT} 身份: 铸渊 · ICE-GL-ZY001 时间: ${new Date().toISOString()} @@ -480,7 +480,7 @@ app.listen(PORT, () => { const healthPath = path.join(BRAIN_DIR, 'health.json'); if (fs.existsSync(BRAIN_DIR)) { const health = { - server: 'ZY-SVR-001', + server: 'ZY-SVR-002', status: 'running', last_check: new Date().toISOString(), started_at: new Date().toISOString(), diff --git a/server/architecture.md b/server/architecture.md index bde7a162..83aaead6 100644 --- a/server/architecture.md +++ b/server/architecture.md @@ -113,7 +113,7 @@ ### L6 · 太空层 — 外部交互 -- 公网API:`https://150.109.76.244/api/`(后续绑定域名) +- 公网API:`https://43.134.16.246/api/`(后续绑定域名) - 管理面板:`/dashboard`(铸渊自有管理界面) - 健康探针:`/api/health`(外部监控接入点) diff --git a/server/migration-plan.md b/server/migration-plan.md index a8d764c4..d1ac9683 100644 --- a/server/migration-plan.md +++ b/server/migration-plan.md @@ -32,7 +32,7 @@ Phase 3: 服务器(完全独立) + GitHub仓库(归档) | 密钥名称 | 说明 | 操作编号 | |----------|------|---------| -| `ZY_SERVER_HOST` | `150.109.76.244` | ZY-SVR-SETUP-001 | +| `ZY_SERVER_HOST` | `43.134.16.246` | ZY-SVR-SETUP-002 | | `ZY_SERVER_USER` | SSH用户名 (建议 `root`) | ZY-SVR-SETUP-001 | | `ZY_SERVER_KEY` | SSH私钥 (PEM格式完整内容) | ZY-SVR-SETUP-001 | | `ZY_SERVER_PATH` | `/opt/zhuyuan` | ZY-SVR-SETUP-001 | @@ -44,15 +44,15 @@ Phase 3: 服务器(完全独立) + GitHub仓库(归档) - [ ] 冰朔配置4个GitHub Secrets - [ ] 运行 `deploy-to-zhuyuan-server.yml` (init动作) 初始化服务器 - [ ] 运行 `deploy-to-zhuyuan-server.yml` (deploy动作) 部署应用 -- [ ] 验证 `http://150.109.76.244/api/health` 返回正常 -- [ ] 验证 `http://150.109.76.244/api/brain` 返回大脑状态 +- [ ] 验证 `http://43.134.16.246/api/health` 返回正常 +- [ ] 验证 `http://43.134.16.246/api/brain` 返回大脑状态 - [ ] 运行 `node scripts/zhuyuan-server-health.js` 确认健康 ### Phase 1 交付物 | 组件 | 状态 | 说明 | |------|------|------| -| 服务器OS | ✅ 已就绪 | Ubuntu 22.04 LTS | +| 服务器OS | ✅ 已就绪 | Ubuntu 24.04 LTS | | 初始化脚本 | ✅ 已完成 | `server/setup/zhuyuan-server-init.sh` | | 应用代码 | ✅ 已完成 | `server/app/server.js` | | PM2配置 | ✅ 已完成 | `server/ecosystem.config.js` | diff --git a/server/scripts/health-check.sh b/server/scripts/health-check.sh index c1684e64..5245c163 100644 --- a/server/scripts/health-check.sh +++ b/server/scripts/health-check.sh @@ -56,7 +56,7 @@ HEALTH_FILE="${BRAIN_DIR}/health.json" mkdir -p "${BRAIN_DIR}" cat > "${HEALTH_FILE}" << HEALTH_JSON { - "server": "ZY-SVR-001", + "server": "ZY-SVR-002", "status": "${APP_STATUS}", "last_check": "$(date -u +%Y-%m-%dT%H:%M:%SZ)", "services": { diff --git a/server/setup/zhuyuan-server-init.sh b/server/setup/zhuyuan-server-init.sh index a4194e31..aeb1faa7 100644 --- a/server/setup/zhuyuan-server-init.sh +++ b/server/setup/zhuyuan-server-init.sh @@ -50,8 +50,8 @@ fi echo "" echo -e "${BLUE}═══════════════════════════════════════════════════════════${NC}" -echo -e "${BLUE} 铸渊主权服务器初始化 · ZY-SVR-001 ${NC}" -echo -e "${BLUE} Ubuntu Server 22.04 LTS · 150.109.76.244 ${NC}" +echo -e "${BLUE} 铸渊主权服务器初始化 · ZY-SVR-002 ${NC}" +echo -e "${BLUE} Ubuntu Server 24.04 LTS · 43.134.16.246 ${NC}" echo -e "${BLUE}═══════════════════════════════════════════════════════════${NC}" echo "" @@ -119,7 +119,7 @@ cat > "${ZY_ROOT}/sites/production/index.html" << 'PROD_PAGE' .tag{display:inline-block;padding:4px 12px;border-radius:12px;background:#238636;color:#fff;font-size:0.85em;margin:0.5em} p{color:#8b949e;line-height:1.6}

🏛️ 铸渊主权服务器

-ZY-SVR-001 · production +ZY-SVR-002 · production

光湖语言世界 · 唯一现实执行操作层
版权: 国作登字-2026-A-00037559

铸渊100%主控 · 人类不直接触碰

@@ -134,7 +134,7 @@ cat > "${ZY_ROOT}/sites/preview/index.html" << 'PREVIEW_PAGE' .tag{display:inline-block;padding:4px 12px;border-radius:12px;background:#da3633;color:#fff;font-size:0.85em;margin:0.5em} p{color:#8b949e;line-height:1.6}

🪞 铸渊预览站

-ZY-SVR-001 · preview +ZY-SVR-002 · preview

功能模块预览 · 确认无误后一键推送到主站

所有部署先到此站验证 → 冰朔确认 → 一键 promote 到主站

@@ -150,7 +150,7 @@ cat > "${ZY_BRAIN}/identity.json" << 'IDENTITY' { "name": "铸渊", "id": "ICE-GL-ZY001", - "server_code": "ZY-SVR-001", + "server_code": "ZY-SVR-002", "role": "铸渊物理执行层 · 主权服务器", "sovereign": "TCS-0002∞ · 冰朔", "copyright": "国作登字-2026-A-00037559", @@ -163,7 +163,7 @@ sed -i "s/INIT_TIMESTAMP/$(date -u +%Y-%m-%dT%H:%M:%SZ)/" "${ZY_BRAIN}/identity. cat > "${ZY_BRAIN}/health.json" << 'HEALTH' { - "server": "ZY-SVR-001", + "server": "ZY-SVR-002", "status": "initializing", "last_check": null, "services": { @@ -243,11 +243,11 @@ REPORT="${ZY_DATA}/logs/init-report.json" cat > "${REPORT}" << REPORT_END { "event": "server_initialization", - "server": "ZY-SVR-001", + "server": "ZY-SVR-002", "timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)", "status": "success", "components": { - "os": "$(lsb_release -d -s 2>/dev/null || echo 'Ubuntu 22.04')", + "os": "$(lsb_release -d -s 2>/dev/null || echo 'Ubuntu 24.04')", "node": "$(node -v 2>/dev/null || echo 'not installed')", "npm": "$(npm -v 2>/dev/null || echo 'not installed')", "pm2": "$(pm2 -v 2>/dev/null || echo 'not installed')",