forked from edosssa/pm2-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpm2config.json
323 lines (322 loc) · 9.52 KB
/
pm2config.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
{
"$schema": "http://json-schema.org/schema#",
"description": "PM2 configuration schema. See https://pm2.io/docs/runtime/reference/ecosystem-file/",
"type": "object",
"properties": {
"apps": {
"type": "array",
"items": {
"$ref": "#/definitions/App"
}
},
"deploy": {
"examples": ["staging", "production"],
"patternProperties": {
"^.*$": {
"$ref": "#/definitions/Deploy"
}
}
}
},
"definitions": {
"App": {
"required": ["script"],
"properties": {
"append_env_to_name": {
"description": "Append the environment name to the app name",
"type": "boolean"
},
"args": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "string"
}
],
"description": "Arguments to pass to the script"
},
"automation": {
"description": "Enable or disable apm wrapping",
"type": "boolean"
},
"autorestart": {
"description": "Enable or disable auto restart after process failure",
"type": "boolean"
},
"cron_restart": {
"description": "A cron pattern to restart your app",
"type": "string"
},
"cwd": {
"description": "Current working directory to start the process with",
"type": "string"
},
"disable_logs": {
"description": "Disable all logs storage",
"type": "boolean"
},
"disable_source_map_support": {
"description": "Enable or disable the source map support",
"type": "boolean"
},
"disable_trace": {
"description": "Enable or disable the transaction tracing",
"type": "boolean"
},
"env": {
"anyOf": [
{
"properties": {},
"type": "object"
},
{
"type": "string"
}
],
"description": "Specify environment variables to be injected"
},
"error": {
"description": "File path for stderr (each line is appended to this file)",
"type": "string"
},
"exec_mode": {
"description": "Set the execution mode, possible values: fork|cluster",
"type": "string"
},
"force": {
"description": "Start a script even if it is already running (only the script path is considered)",
"type": "boolean"
},
"gid": {
"description": "Set group id",
"type": "string"
},
"ignore_watch": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "string"
}
],
"description": "List of paths to ignore (regex)"
},
"increment_var": {
"description": "Specify the name of an environnement variable to inject which increments for each cluster",
"type": "string"
},
"instance_var": {
"description": "Rename the NODE_APP_INSTANCE environment variable",
"type": "string"
},
"instances": {
"description": "Number of instances to be started in cluster mode",
"type": "number"
},
"interpreter": {
"description": "Interpreter absolute path",
"type": "string"
},
"kill_timeout": {
"description": "Time in ms before sending the final SIGKILL signal after SIGINT",
"type": "number"
},
"listen_timeout": {
"description": "Time in ms before forcing a reload if app is still not listening/has still not sent ready",
"type": "number"
},
"log": {
"description": "File path for combined stdout and stderr (each line is appended to this file)",
"type": ["string", "boolean"]
},
"log_date_format": {
"description": "Format for log timestamps in moment.js format (eg YYYY-MM-DD HH?:mm Z)",
"type": "string"
},
"log_types": {
"description": "Define a specific log output type, possible value?: json",
"type": "string"
},
"maxRestarts": {
"description": "Number of times a script is restarted when it exits in less than min_uptime",
"type": "number"
},
"max_memory_restart": {
"description": "Restart the app if an amount of memory is exceeded (format: /0-9?/ K for KB, ‘M’ for MB, ‘G’ for GB, default to B)",
"type": ["string", "number"]
},
"merge_logs": {
"description": "In cluster mode, merge each type of logs into a single file (instead of having one for each cluster)",
"type": "string"
},
"min_uptime": {
"description": "Minimum uptime of the app to be considered started (format is /[0-9]+(h|m|s)?/, for hours, minutes, seconds, default to ms)",
"type": ["string", "number"]
},
"name": {
"type": "string"
},
"node_args": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "string"
}
],
"description": "Arguments to pass to the interpreter"
},
"output": {
"description": "File path for stdout (each line is appended to this file)",
"type": "string"
},
"pid_file": {
"description": "File path where the pid of the started process is written by pm2",
"type": "string"
},
"pmx": {
"description": "Enable or disable apm wrapping",
"type": "boolean"
},
"port": {
"description": "Shortcut to inject a PORT environment variable",
"type": "number"
},
"post_update": {
"description": "List of commands executed after a pull/upgrade operation performed from Keymetrics dashboard",
"items": {
"type": "string"
},
"type": "array"
},
"restartDelay": {
"description": "Time in ms to wait before restarting a crashing app",
"type": "number"
},
"script": {
"description": "Path of the script to launch, required field",
"type": "string"
},
"source_map_support": {
"description": "source_map_support \tEnable or disable the source map support",
"type": "boolean"
},
"trace": {
"description": "Enable or disable the transaction tracing",
"type": "boolean"
},
"treekill": {
"description": "Only kill the main process, not detached children",
"type": "boolean"
},
"uid": {
"description": "Set user id",
"type": "string"
},
"vizion": {
"description": "Enable or disable the versioning metadatas (vizion library)",
"type": "boolean"
},
"wait_ready": {
"description": "Make the process wait for a process.send(‘ready’)",
"type": "boolean"
},
"watch": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "string"
}
],
"description": "Enable or disable the watch mode"
},
"watch_options": {
"description": "Object that will be used as an options with chokidar (refer to chokidar documentation)",
"properties": {},
"type": "object"
}
},
"type": "object"
},
"Deploy": {
"properties": {
"host": {
"description": "SSH host",
"items": {
"type": "string"
},
"type": "array"
},
"key": {
"description": "SSH key path",
"type": "string"
},
"path": {
"description": "path in the server",
"type": "string"
},
"post-deploy": {
"description": "post-deploy action",
"type": "string"
},
"post-setup": {
"description": "Post-setup commands or path to a script on the host machine",
"type": "string"
},
"pre-deploy-local": {
"description": "pre-deploy action",
"type": "string"
},
"pre-setup": {
"description": "Pre-setup command or path to a script on your local machine",
"type": "string"
},
"ref": {
"description": "GIT remote/branch",
"type": "string"
},
"repo": {
"description": "GIT remote",
"type": "string"
},
"shh_options": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "string"
}
],
"description": "SSH options with no command-line flag, see ‘man ssh’"
},
"user": {
"description": "SSH user",
"type": "string"
}
},
"type": "object"
}
}
}