Add PM2 ecosystem configuration
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
module.exports = {
|
||||
apps: [{
|
||||
name: 'photo-sharing',
|
||||
script: './server.js',
|
||||
instances: 'max',
|
||||
exec_mode: 'cluster',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
PORT: 3000
|
||||
},
|
||||
error_file: './logs/pm2-error.log',
|
||||
out_file: './logs/pm2-out.log',
|
||||
log_date_format: 'YYYY-MM-DD HH:mm:ss',
|
||||
max_memory_restart: '1G',
|
||||
watch: false,
|
||||
ignore_watch: ['node_modules', 'logs', 'storage'],
|
||||
wait_ready: true,
|
||||
listen_timeout: 3000,
|
||||
kill_timeout: 5000
|
||||
}]
|
||||
};
|
||||
Reference in New Issue
Block a user