/**
 * 铸渊 MCP Server · PM2 生态系统配置
 */
module.exports = {
  apps: [{
    name: 'guanghulab-mcp-server',
    script: 'index.js',
    cwd: __dirname,
    instances: 1,
    autorestart: true,
    watch: true,
    max_memory_restart: '128M',
    env: {
      NODE_ENV: 'production',
      MCP_PORT: '8083',
      MCP_HOST: '127.0.0.1',
      GITEA_URL: 'http://127.0.0.1:3001',
      GITEA_TOKEN: '2d924a6e19b44d14bf367f5dd1ce238510128183', // 铸渊 Direct注入 - 冰朔个人令牌
      GITEA_OWNER: 'bingshuo',
      GITEA_REPO: 'guanghulab',
      REPO_DIR: '/data/guanghulab/repo',
      MCP_ACCESS_KEY_PATH: '/data/guanghulab/mcp-server/.access-key',
    },
    log_file: '/data/guanghulab/.runtime/logs/mcp-server-combined.log',
    error_file: '/data/guanghulab/.runtime/logs/mcp-server-error.log',
    out_file: '/data/guanghulab/.runtime/logs/mcp-server-out.log',
    log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
    merge_logs: true,
    time: true,
  }],
};
