-
Notifications
You must be signed in to change notification settings - Fork 1
/
ecosystem.json5
61 lines (55 loc) · 1.28 KB
/
ecosystem.json5
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
{
/**
* This is a sample configuration file for PM2
*/
/**
* Here we declare the apps that must be managed by PM2
* All options are listed here:
* https://github.com/Unitech/PM2/blob/master/ADVANCED_README.md#json-app-declaration
*
*/
apps : [
// First application
{
name : "API",
script : "./bin/api.js",
env: {
APIPORT: 3030,
NODE_PATH: "./api"
},
env_production : {
NODE_ENV: "production"
}
},
// Second application
{
name : "WEB",
script : "./bin/server.js",
exec_mode : "cluster",
instances : 2,
env: {
APIPORT: 3030,
PORT: 8080,
NODE_PATH: "./src"
},
env_production : {
NODE_ENV: "production"
}
}
],
/**
* PM2 help you to deploy apps over your servers
* For more help go to :
* https://github.com/Unitech/PM2/blob/master/ADVANCED_README.md#deployment-pm2--090
*/
deploy : {
production : {
user : "node",
host : "104.236.175.106",
ref : "origin/prod",
repo : "git@github.com:whoaa512/list-share.git",
path : "/var/www/production",
"post-deploy" : "npm install && pm2 startOrGracefulReload ecosystem.json5 --env production"
}
}
}