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:
parent
40625827f1
commit
91f0ce271b
2 changed files with 29 additions and 1 deletions
24
ecosystem.config.js
Normal file
24
ecosystem.config.js
Normal 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
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
@ -5,7 +5,11 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "node test/e2e.js",
|
"test": "node test/e2e.js",
|
||||||
"start": "node src/index.js",
|
"start": "node src/index.js",
|
||||||
"sample-mcp": "node sample-mcp/index.js"
|
"sample-mcp": "node sample-mcp/index.js",
|
||||||
|
"pm2:start": "pm2 start ecosystem.config.js",
|
||||||
|
"pm2:stop": "pm2 stop all",
|
||||||
|
"pm2:logs": "pm2 logs",
|
||||||
|
"pm2:status": "pm2 status"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue