-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathecosystem.config.js
More file actions
39 lines (36 loc) · 1009 Bytes
/
ecosystem.config.js
File metadata and controls
39 lines (36 loc) · 1009 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
29
30
31
32
33
34
35
36
37
38
39
/** ****************************************************************************************************
* @file: ecosystem.config.js
* @project: template-api
* @author Nick Soggin <iSkore@users.noreply.github.com> on 28-Jan-2019
*******************************************************************************************************/
'use strict';
const
{ name } = require( './package.json' ),
{ resolve } = require( 'path' ),
isProduction = process.argv.includes( 'production' );
const apps = [
{
name,
script: resolve( __dirname, './src/entrypoint.js' ),
exec_mode: 'cluster',
instances: isProduction ? 0 : 1,
instance_var: 'INSTANCE_ID',
wait_ready: true,
autorestart: true,
restartDelay: 5000,
watch: !isProduction,
ignore_watch: [ 'storage' ],
max_memory_restart: '1G',
node_args: [
'--no-warnings',
'--max-old-space-size=8192'
],
env: {
NODE_ENV: 'development'
},
env_production: {
NODE_ENV: 'production'
}
}
];
module.exports = { apps };