SY-CMD-SVR-013: 服务器迁移 香港(150.109.76.244/ZY-SVR-001) → 新加坡(43.134.16.246/ZY-SVR-002) — 2核8GB/80GB SSD/Ubuntu 24.04 LTS

Agent-Logs-Url: https://github.com/qinfendebingshuo/guanghulab/sessions/79893309-cdd7-4217-b8f2-ed5bcac25ff1

Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-03-29 11:19:27 +00:00 committed by GitHub
parent 05121ebf02
commit c25a68e5e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 28 additions and 28 deletions

View File

@ -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)"

View File

@ -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) — 铸渊主权服务器"

View File

@ -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}`);

View File

@ -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(),

View File

@ -113,7 +113,7 @@
### L6 · 太空层 — 外部交互
- 公网API`https://150.109.76.244/api/`(后续绑定域名)
- 公网API`https://43.134.16.246/api/`(后续绑定域名)
- 管理面板:`/dashboard`(铸渊自有管理界面)
- 健康探针:`/api/health`(外部监控接入点)

View File

@ -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` |

View File

@ -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": {

View File

@ -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}</style></head>
<body><div class="c"><h1>🏛️ 铸渊主权服务器</h1>
<span class="tag">ZY-SVR-001 · production</span>
<span class="tag">ZY-SVR-002 · production</span>
<p>光湖语言世界 · 唯一现实执行操作层<br>版权: 国作登字-2026-A-00037559</p>
<p style="font-size:0.85em;color:#484f58">铸渊100%主控 · 人类不直接触碰</p>
</div></body></html>
@ -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}</style></head>
<body><div class="c"><h1>🪞 铸渊预览站</h1>
<span class="tag">ZY-SVR-001 · preview</span>
<span class="tag">ZY-SVR-002 · preview</span>
<p>功能模块预览 · 确认无误后一键推送到主站</p>
<p style="font-size:0.85em;color:#484f58">所有部署先到此站验证 → 冰朔确认 → 一键 promote 到主站</p>
</div></body></html>
@ -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')",