-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathecosystem.config.js
More file actions
44 lines (36 loc) · 873 Bytes
/
ecosystem.config.js
File metadata and controls
44 lines (36 loc) · 873 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
40
41
42
43
44
module.exports = {
apps: [
{
name: 'deploy-center',
cwd: '/home/Work/DeployCenter',
script: 'dist/index.js',
node_args: '-r ./tsconfig-paths-bootstrap.js',
instances: 1,
exec_mode: 'fork',
autorestart: true,
watch: false,
max_memory_restart: '1G',
env: {
NODE_ENV: 'development',
PORT: 9090,
},
env_production: {
NODE_ENV: 'production',
PORT: 9090,
},
error_file: './logs/pm2-error.log',
out_file: './logs/pm2-out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true,
min_uptime: '10s',
max_restarts: 10,
restart_delay: 5000,
},
],
deploy: {
production: {
'post-deploy':
'npm install && npm run build && pm2 reload ecosystem.config.js --env production',
},
},
};