forked from TerriaJS/nationalmap
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathecosystem.config.js
More file actions
28 lines (25 loc) · 778 Bytes
/
Copy pathecosystem.config.js
File metadata and controls
28 lines (25 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*global __dirname*/
const path = require('path');
// Pass through additional arguments that might ultimately have come from
// something like `yarn start -- --port 3009`
const argpos = process.argv.indexOf('--');
const args = argpos > -1 ? process.argv.slice(argpos + 1) : [];
module.exports = {
apps : [{
name: path.basename(__dirname),
script: require.resolve('terriajs-server'),
// Options reference: https://pm2.io/doc/en/runtime/reference/ecosystem-file/
// passed to app, so any valid arguments in options.js are allowed.
args: args.join(' '),
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
env: {
NODE_ENV: 'development'
},
env_production: {
NODE_ENV: 'production'
}
}]
};