-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecosystem.config.js
37 lines (35 loc) · 1.22 KB
/
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
module.exports = {
apps: [
{
name: 'blogend',
script: './app.js',
instances: 'max',
autorestart: true,
watch: false,
max_memory_restart: '1G',
env: {
COMMON_VARIABLE: 'true'
},
env_production: {
NODE_ENV: 'production'
}
},
],
deploy: {
production: {
// SSH key path, default to $HOME/.ssh
key: '~/.ssh/id_rsa',
// SSH options with no command-line flag, see 'man ssh'
// can be either a single string or an array of strings
ssh_options: "StrictHostKeyChecking=no",
user: 'Garen',
host: 'www.garener.com',
ref: 'origin/master',
repo: '[email protected]:AbsenceSliet/blog-node.git',
path: '/www/blog_node/production',
//&& pm2 reload ecosystem.config.js --env production
"pre-setup" : "echo 'commands or local script path to be run on the host before the setup process starts'",
'post-deploy': 'rm -rf node_modules && yarn && yarn build:pro && pm2 reload ecosystem.config.js --env production '
},
}
};