-
Notifications
You must be signed in to change notification settings - Fork 2
/
pm2.json
139 lines (139 loc) · 4.23 KB
/
pm2.json
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
{
// App part
"apps" : [{
"name" : "loc-db",
"script" : "app.js",
"append_env_to_name": true,
//"node_args": "--trace-gc-verbose",
"env_demo": {
"NODE_ENV": "demo",
"LOCDB_PORT": 3102,
"LOCDB_DB_SCHEMA": "locdb-demo",
"LOCDB_HOST": "locdb.bib.uni-mannheim.de",
"LOCDB_BASEPATH": "/demo",
"LOCDB_UPLOAD_PATH": "./../upload/",
"LOCDB_CACHE_PATH": "./../cache/"
},
"env_development": {
"NODE_ENV": "development",
"LOCDB_PORT": 3101,
"LOCDB_DB_SCHEMA": "locdb-dev",
"LOCDB_HOST": "locdb.bib.uni-mannheim.de",
"LOCDB_BASEPATH": "/locdb-dev",
"LOCDB_UPLOAD_PATH": "./../upload/",
"LOCDB_CACHE_PATH": "./../cache/"
},
"env_production" : {
"NODE_ENV": "production",
"LOCDB_PORT": 3100,
"LOCDB_DB_SCHEMA": "locdb-prod",
"LOCDB_HOST": "locdb.bib.uni-mannheim.de",
"LOCDB_BASEPATH": "/locdb",
"LOCDB_UPLOAD_PATH": "./../upload/",
"LOCDB_CACHE_PATH": "./../cache/"
},
"env_tuebingen": {
"NODE_ENV": "tuebingen",
"LOCDB_PORT": 3103,
"LOCDB_DB_SCHEMA": "locdb-tue",
"LOCDB_HOST": "locdb.bib.uni-mannheim.de",
"LOCDB_BASEPATH": "/locdb-tue",
"LOCDB_UPLOAD_PATH": "./../upload/",
"LOCDB_CACHE_PATH": "./../cache/"
}
},
{
"name" : "loc-db-jobs",
"script" : "./api/jobs/jobs.js",
"append_env_to_name": true,
"node_args": "--trace-gc-verbose",
"env_development": {
"NODE_ENV": "development",
"LOCDB_PORT": 3101,
"LOCDB_DB_SCHEMA": "locdb-dev",
"LOCDB_HOST": "locdb.bib.uni-mannheim.de",
"LOCDB_BASEPATH": "/locdb-dev",
"LOCDB_UPLOAD_PATH": "./../upload/",
"LOCDB_CACHE_PATH": "./../cache/"
},
"env_production" : {
"NODE_ENV": "production",
"LOCDB_PORT": 3100,
"LOCDB_DB_SCHEMA": "locdb-prod",
"LOCDB_HOST": "locdb.bib.uni-mannheim.de",
"LOCDB_BASEPATH": "/locdb",
"LOCDB_UPLOAD_PATH": "./../upload/",
"LOCDB_CACHE_PATH": "./../cache/"
},
"env_demo": {
"NODE_ENV": "demo",
"LOCDB_PORT": 3102,
"LOCDB_DB_SCHEMA": "locdb-demo",
"LOCDB_HOST": "locdb.bib.uni-mannheim.de",
"LOCDB_BASEPATH": "/demo",
"LOCDB_UPLOAD_PATH": "./../upload/",
"LOCDB_CACHE_PATH": "./../cache/"
},
"env_tuebingen": {
"NODE_ENV": "tuebingen",
"LOCDB_PORT": 3103,
"LOCDB_DB_SCHEMA": "locdb-tue",
"LOCDB_HOST": "locdb.bib.uni-mannheim.de",
"LOCDB_BASEPATH": "/locdb-tue",
"LOCDB_UPLOAD_PATH": "./../upload/",
"LOCDB_CACHE_PATH": "./../cache/"
}
}],
// Deployment part
"deploy" : {
"production" : {
"user" : "anlausch",
// Multi host is possible, just by passing IPs/hostname as an array
"host" : "locdb",
// Branch
"ref" : "origin/master",
// Git repository to clone
"repo" : "[email protected]:locdb/loc-db.git",
// Path of the application on target servers
"path" : "~/locdb-prod",
"post-deploy" : "npm install && pm2 startOrRestart pm2.json --env production",
// Environment variables that must be injected in all applications on this env
"env" : {
"NODE_ENV": "production"
}
},
"development" : {
"user" : "anlausch",
"host" : "locdb",
"ref" : "remotes/origin/datamodel",
"repo" : "[email protected]:locdb/loc-db.git",
"path" : "~/locdb-dev",
"post-deploy" : "npm install && pm2 startOrRestart pm2.json --env development --output /dev/null --error /dev/null",
"env" : {
"NODE_ENV": "development"
}
},
"demo" : {
"user" : "anlausch",
"host" : "locdb",
"ref" : "origin/master",
"repo" : "[email protected]:locdb/loc-db.git",
"path" : "~/locdb-demo",
"post-deploy" : "npm install && pm2 startOrRestart pm2.json --env demo",
"env" : {
"NODE_ENV": "demo"
}
},
"tuebingen" : {
"user" : "anlausch",
"host" : "locdb",
"ref" : "remotes/origin/datamodel",
"repo" : "[email protected]:locdb/loc-db.git",
"path" : "~/locdb-tue",
"post-deploy" : "npm install && pm2 startOrRestart pm2.json --env tuebingen",
"env" : {
"NODE_ENV": "tuebingen"
}
}
}
}