Add pm2 process management

- Add ecosystem.config.js with mcp-hub and sample-mcp app configs
- Add pm2:start, pm2:stop, pm2:logs, pm2:status scripts to package.json

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Agent 2026-03-13 09:08:10 +00:00
parent 40625827f1
commit 91f0ce271b
2 changed files with 29 additions and 1 deletions

24
ecosystem.config.js Normal file
View file

@ -0,0 +1,24 @@
module.exports = {
apps: [
{
name: 'mcp-hub',
script: 'src/index.js',
cwd: '/workspace',
env: { NODE_ENV: 'production', PORT: 3000 },
max_restarts: 10,
restart_delay: 1000,
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true
},
{
name: 'sample-mcp',
script: 'sample-mcp/index.js',
cwd: '/workspace',
env: { NODE_ENV: 'production' },
max_restarts: 10,
restart_delay: 2000,
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true
}
]
};