add ecosystem with production env and easier to start deleter and clustered server

merge-requests/208/head
fatchan 5 years ago
parent 3e67a5df55
commit e4009bc40e
  1. 32
      ecosystem.config.js

@ -0,0 +1,32 @@
module.exports = {
// Options reference: https://pm2.io/doc/en/runtime/reference/ecosystem-file/
apps : [{
name: 'chan',
script: 'server.js',
instances: 2,
autorestart: true,
watch: false,
max_memory_restart: '1G',
log_date_format: 'YYYY-MM-DD HH:mm:ss',
env: {
NODE_ENV: 'development'
},
env_production: {
NODE_ENV: 'production'
}
}, {
name: 'deleter',
script: 'deletescheduler.js',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
log_date_format: 'YYYY-MM-DD HH:mm:ss',
env: {
NODE_ENV: 'development'
},
env_production: {
NODE_ENV: 'production'
}
}]
};
Loading…
Cancel
Save