Files
SolidScribe/server/ecosystem.config.js

29 lines
930 B
JavaScript

module.exports = {
apps : [{
name: 'NoteServer',
script: 'index.js',
// Both relative to this file, not to whatever directory pm2 was invoked
// from. deploy.sh runs pm2 from the repo root, so without cwd pm2 resolves
// script against the root and dies with "Script not found: .../index.js".
cwd: __dirname,
// Options reference: https://pm2.io/doc/en/runtime/reference/ecosystem-file/
// args: 'one two',
instances: 1,
autorestart: true,
// Off by default so it is safe in production: with watch on, a `git pull`
// that touches server files restarts pm2 mid-pull, potentially booting a
// half-updated tree. startLocalDev.sh passes --watch for development.
watch: false,
ignore_watch : ["node_modules", "staticFiles"],
max_memory_restart: '1G',
env: {
NODE_ENV: 'development'
},
env_production: {
NODE_ENV: 'production'
}
}],
};