-
Notifications
You must be signed in to change notification settings - Fork 3
/
ecosystem.config.js
41 lines (41 loc) · 1.29 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
38
39
40
41
module.exports = {
apps : [{
name: "code-english5001",
script: "./app.js",
env: {
NODE_ENV: "development",
},
env_production: {
NODE_ENV: "production",
}
}],
deploy: {
// "production" is the environment name
production: {
// SSH key path, default to $HOME/.ssh
// key: "$HOME/.ssh",
// SSH user
user: "root",
// SSH host
host: ["47.98.138.195"],
// 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",
// GIT remote/branch
ref: "origin/master",
// GIT remote
repo: "[email protected]:raoenhui/code-english.git",
// path in the server
path: "/ice/pm2/code-english",
// Pre-setup command or path to a script on your local machine
"pre-setup": "apt-get install git ; ls -la",
// Post-setup commands or path to a script on the host machine
// eg: placing configurations in the shared dir etc
"post-setup": "ls -la",
// pre-deploy action
"pre-deploy-local": "echo 'This is a pre-deploy-local command'",
// post-deploy action
"post-deploy": "npm install && npm run build && pm2 reload ecosystem.config.js --env production"
},
}
}