-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathecosystem.config.js
39 lines (38 loc) · 987 Bytes
/
ecosystem.config.js
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
module.exports = {
apps: [
{
name: 'API',
script: './bin/www',
cwd: './',
// Options reference: https://pm2.io/doc/en/runtime/reference/ecosystem-file/
output: './logs/out.log',
error: './logs/error.log',
log: './logs/run.log',
instances: 1,
autorestart: true,
watch: ['routes', 'config', 'lib', 'app.js'],
ignore_watch: ['bin', 'logs', 'node_modules', 'public', 'temp'],
watch_options: {
followSymlinks: false
},
max_memory_restart: '1G',
env: {
NODE_ENV: 'development'
},
env_production: {
NODE_ENV: 'production'
}
}
],
deploy: {
production: {
user: 'root',
host: '42.51.43.29',
ref: 'origin/master',
repo: '[email protected]:liup007/gsshopnode.git',
path: '/www/production',
'post-deploy':
'git pull origin master && npm install && pm2 reload ecosystem.config.js --env production'
}
}
}