-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathecosystem.config.js
73 lines (72 loc) · 2.09 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
const path = require("path");
module.exports = {
apps: [
{
name: "rollout",
script: "src/index.js",
// Options reference: https://pm2.keymetrics.io/docs/usage/application-declaration/
// args: "one two",
cwd:"./",
log_date_format:"YYYY-MM-DD HH:mm:ss",
out_file:"./logs/out-0.log",
error_file:"./logs/err-0.log",
watch:true,
exec_interpreter:"babel-node",
instances: 1,
autorestart: true,
watch: true,
// exec_mode:"fork",
env: {
COMMON_VARIABLE: 'true'
},
env_production : {
NODE_ENV: 'production'
},
watch:
process.env.NODE_ENV !== "production"
? path.resolve(__dirname, "./")
: false,
exec_mode: "cluster",
max_memory_restart: "1G",
instances: 1,
env_production: {
NODE_ENV: "production"
}
}
],
deploy: {
production: {
user: "ubuntu",
host: "ec2-3-6-90-204.ap-south-1.compute.amazonaws.com",
key: "C://UsersAT/systems/Downloads/rollout-push-2020.pem",
repo: "https://github.com/saurabharch/rollout.git",
ref: "origin/master",
path: "/home/rollout/rollout",
"post-deploy":
"npm install && pm2 startOrRestart ecosystem.config.json --env production"
},
development: {
user: "saurabh",
host: "http://localhost:5500",
repo: "https://github.com/saurabharch/rollout.git",
ref: "origin/master",
path: ".",
"post-deploy":
"npm install && pm2 startOrRestart ecosystem.config.json --env production"
}
}
// deploy: {
// production: {
// user: "ubuntu",
// host: "212.83.163.1",
// // host: "ec2-3-6-90-204.ap-south-1.compute.amazonaws.com,
// key: "~/.ssh/rollout.pem",
// ref: "origin/master",
// repo: "[email protected]:saurabharch/rollout.git",
// path: "/var/www/production",
// "post-deploy":
// "npm install && pm2 reload ecosystem.config.js --env production"
// // "post-deploy": "npm install && pm2 startOrRestart ecosystem.config.js"
// }
// }
};