diff --git a/ecosystem.config.js b/ecosystem.config.js index 28aa157..0936ed2 100644 --- a/ecosystem.config.js +++ b/ecosystem.config.js @@ -1,21 +1,53 @@ // 部署根目录: 通过 DEPLOY_ROOT 环境变量统一配置 // 默认 /opt/guanghu (ZY-SVR-TPL-2026-0426-001 标准) -// 兼容旧路径: 若 DEPLOY_ROOT 未设置, 自动检测仓库相对位置 const path = require('path'); const DEPLOY_ROOT = process.env.DEPLOY_ROOT || '/opt/guanghu'; module.exports = { - apps: [{ - name: 'dingtalk-bot', - script: 'index.js', - cwd: path.join(DEPLOY_ROOT, 'dingtalk-bot'), - node_args: '--preserve-symlinks', - env: { - NODE_ENV: 'production', - PORT: process.env.DINGTALK_BOT_PORT || 3005 + apps: [ + { + name: 'dingtalk-bot', + script: 'index.js', + cwd: path.join(DEPLOY_ROOT, 'dingtalk-bot'), + env: { NODE_ENV: 'production', PORT: process.env.DINGTALK_BOT_PORT || 3005 } }, - env_production: { - NODE_ENV: 'production' + // ═══════════════════════════════ + // repo-mcp 冰朔 · 端口3903 + // 仓库: bingshuo/guanghulab + // ═══════════════════════════════ + { + name: 'repo-mcp-bs', + script: 'index.js', + cwd: path.join(DEPLOY_ROOT, 'mcp-servers/repo-mcp-server'), + env: { + NODE_ENV: 'production', + REPO_MCP_PORT: '3903', + REPO_MCP_SECRET: process.env.REPO_MCP_SECRET_BS || 'CHANGE_ME_BS', + GITEA_TOKEN: process.env.GITEA_TOKEN_BS || '', + GITEA_URL: 'https://guanghulab.com', + REPO_OWNER: 'bingshuo', + REPO_NAME: 'guanghulab', + REPO_DEFAULT_BRANCH: 'main' + } + }, + // ═══════════════════════════════ + // repo-mcp 之之 · 端口3904 + // 仓库: bingshuo/zhizhi + // ═══════════════════════════════ + { + name: 'repo-mcp-zz', + script: 'index.js', + cwd: path.join(DEPLOY_ROOT, 'mcp-servers/repo-mcp-server'), + env: { + NODE_ENV: 'production', + REPO_MCP_PORT: '3904', + REPO_MCP_SECRET: process.env.REPO_MCP_SECRET_ZZ || 'CHANGE_ME_ZZ', + GITEA_TOKEN: process.env.GITEA_TOKEN_ZZ || '', + GITEA_URL: 'https://guanghulab.com', + REPO_OWNER: 'bingshuo', + REPO_NAME: 'zhizhi', + REPO_DEFAULT_BRANCH: 'main' + } } - }] + ] };