UNPKG

9.97 kBJSONView Raw
1{
2 "script": {
3 "type": "string",
4 "require": true,
5 "alias" : "exec",
6 "docDescription": "Path of the script to launch, required field"
7 },
8 "name": {
9 "type": "string",
10 "docDefault": "Script filename without the extension (app for app.js)",
11 "docDescription": "Process name in the process list"
12 },
13 "name_prefix": {
14 "type": "string"
15 },
16 "filter_env": {
17 "type": [
18 "boolean",
19 "array",
20 "string"
21 ],
22 "docDefault": false,
23 "docDescription": "Enable filtering global environments"
24 },
25 "namespace": {
26 "type": "string",
27 "docDefault": "default",
28 "docDescription": "Process namespace"
29 },
30 "install_url": {
31 "type": "string"
32 },
33 "cwd": {
34 "type": "string",
35 "docDefault": "CWD of the current environment (from your shell)",
36 "docDescription": "Current working directory to start the process with"
37 },
38 "args": {
39 "type": [
40 "array",
41 "string"
42 ],
43 "docDescription": "Arguments to pass to the script"
44 },
45 "exec_interpreter": {
46 "type": "string",
47 "alias": "interpreter",
48 "docDefault": "node",
49 "docDescription": "Interpreter absolute path"
50 },
51 "node_args": {
52 "type": [
53 "array",
54 "string"
55 ],
56 "alias": ["interpreterArgs", "interpreter_args"],
57 "docDescription": "Arguments to pass to the interpreter"
58 },
59 "out_file": {
60 "type": "string",
61 "alias": ["out", "output", "out_log"],
62 "docDefault": "~/.pm2/logs/<app_name>-out.log",
63 "docDescription": "File path for stdout (each line is appended to this file)"
64 },
65 "error_file": {
66 "type": "string",
67 "alias": ["error", "err", "err_file", "err_log"],
68 "docDefault": "~/.pm2/logs/<app_name>-error.err",
69 "docDescription": "File path for stderr (each line is appended to this file)"
70 },
71 "log_file": {
72 "type": [
73 "boolean",
74 "string"
75 ],
76 "alias": "log",
77 "docDefault": "/dev/null",
78 "docDescription": "File path for combined stdout and stderr (each line is appended to this file)"
79 },
80 "disable_logs": {
81 "type": "boolean",
82 "docDefault": false,
83 "docDescription": "Disable all logs storage"
84 },
85 "log_type": {
86 "type": "string",
87 "docDescription": "Define a specific log output type, possible value: json"
88 },
89 "log_date_format": {
90 "type": "string",
91 "docDescription": "Format for log timestamps in day.js format (eg YYYY-MM-DD HH:mm Z)"
92 },
93 "time": {
94 "type": "boolean"
95 },
96 "env": {
97 "type": [
98 "object",
99 "string"
100 ],
101 "docDescription": "Specify environment variables to be injected"
102 },
103 "^env_\\S*$": {
104 "type": [
105 "object",
106 "string"
107 ],
108 "docDescription": "Specify environment variables to be injected when using --env <env_name>"
109 },
110 "max_memory_restart": {
111 "type": [
112 "string",
113 "number"
114 ],
115 "regex": "^\\d+(G|M|K)?$",
116 "ext_type": "sbyte",
117 "desc": "it should be a NUMBER - byte, \"[NUMBER]G\"(Gigabyte), \"[NUMBER]M\"(Megabyte) or \"[NUMBER]K\"(Kilobyte)",
118 "docDescription": "Restart the app if an amount of memory is exceeded (format: /[0-9](K&#124;M&#124;G)?/ K for KB, 'M' for MB, 'G' for GB, default to B)"
119 },
120 "pid_file": {
121 "type": "string",
122 "alias": "pid",
123 "docDefault": "~/.pm2/pids/app_name-id.pid",
124 "docDescription": "File path where the pid of the started process is written by pm2"
125 },
126 "restart_delay": {
127 "type" : "number",
128 "docDefault": 0,
129 "docDescription": "Time in ms to wait before restarting a crashing app"
130 },
131 "exp_backoff_restart_delay": {
132 "type": "number",
133 "docDefault": 0,
134 "docDescription": "Restart Time in ms to wait before restarting a crashing app"
135 },
136 "source_map_support": {
137 "type": "boolean",
138 "docDefault": true,
139 "docDescription": "Enable or disable the source map support"
140 },
141 "disable_source_map_support": {
142 "type": "boolean",
143 "docDefault": false,
144 "docDescription": "Enable or disable the source map support"
145 },
146 "wait_ready": {
147 "type": "boolean",
148 "docDefault": false,
149 "docDescription": "Make the process wait for a process.send('ready')"
150 },
151 "instances": {
152 "type": "number",
153 "docDefault": 1,
154 "docDescription": "Number of instances to be started in cluster mode"
155 },
156 "kill_timeout": {
157 "type": "number",
158 "docDefault": 1600,
159 "docDescription": "Time in ms before sending the final SIGKILL signal after SIGINT"
160 },
161 "shutdown_with_message": {
162 "type": "boolean",
163 "docDefault": false,
164 "docDescription": "Shutdown an application with process.send('shutdown') instead of process.kill(pid, SIGINT)"
165 },
166 "listen_timeout": {
167 "type": "number",
168 "docDescription": "Time in ms before forcing a reload if app is still not listening/has still note sent ready"
169 },
170 "cron_restart": {
171 "type": [
172 "string",
173 "number"
174 ],
175 "alias": "cron",
176 "docDescription": "A cron pattern to restart your app"
177 },
178 "merge_logs": {
179 "type": "boolean",
180 "alias" : "combine_logs",
181 "docDefault": false,
182 "docDescription": "In cluster mode, merge each type of logs into a single file (instead of having one for each cluster)"
183 },
184 "vizion": {
185 "type": "boolean",
186 "default" : true,
187 "docDefault" : "True",
188 "docDescription": "Enable or disable the versioning metadatas (vizion library)"
189 },
190 "autorestart": {
191 "type": "boolean",
192 "default": true,
193 "docDefault": "True",
194 "docDescription": "Enable or disable auto restart after process failure"
195 },
196 "stop_exit_codes": {
197 "type": [
198 "array",
199 "number"
200 ],
201 "docDescription": "List of exit codes that should allow the process to stop (skip autorestart)."
202 },
203 "watch_delay": {
204 "type": "number",
205 "docDefault": "True",
206 "docDescription": "Restart delay on file change detected"
207 },
208 "watch": {
209 "type": [
210 "boolean",
211 "array",
212 "string"
213 ],
214 "docDefault": false,
215 "docDescription": "Enable or disable the watch mode"
216 },
217 "ignore_watch": {
218 "type": [
219 "array",
220 "string"
221 ],
222 "docDescription": "List of paths to ignore (regex)"
223 },
224 "watch_options": {
225 "type": "object",
226 "docDescription": "Object that will be used as an options with chokidar (refer to chokidar documentation)"
227 },
228 "min_uptime": {
229 "type": [
230 "number",
231 "string"
232 ],
233 "regex": "^\\d+(h|m|s)?$",
234 "desc": "it should be a NUMBER - milliseconds, \"[NUMBER]h\"(hours), \"[NUMBER]m\"(minutes) or \"[NUMBER]s\"(seconds)",
235 "min": 100,
236 "ext_type": "stime",
237 "docDefault": 1000,
238 "docDescription": "Minimum uptime of the app to be considered started (format is /[0-9]+(h&#124;m&#124;s)?/, for hours, minutes, seconds, docDefault to ms)"
239 },
240 "max_restarts": {
241 "type": "number",
242 "min": 0,
243 "docDefault": 16,
244 "docDescription": "Number of times a script is restarted when it exits in less than min_uptime"
245 },
246 "execute_command": {
247 "type": "boolean"
248 },
249 "exec_mode": {
250 "type": "string",
251 "regex": "^(cluster|fork)(_mode)?$",
252 "desc": "it should be \"cluster\"(\"cluster_mode\") or \"fork\"(\"fork_mode\") only",
253 "docDefault": "fork",
254 "docDescription": "Set the execution mode, possible values: fork&#124;cluster"
255 },
256 "force": {
257 "type": "boolean",
258 "docDefault": false,
259 "docDescription": "Start a script even if it is already running (only the script path is considered)"
260 },
261 "append_env_to_name": {
262 "type": "boolean",
263 "docDefault": false,
264 "docDescription": "Append the environment name to the app name"
265 },
266 "post_update": {
267 "type": "array",
268 "docDescription": "List of commands executed after a pull/upgrade operation performed from Keymetrics dashboard"
269 },
270 "trace": {
271 "type": [
272 "boolean"
273 ],
274 "docDefault": false,
275 "docDescription": "Enable or disable the transaction tracing"
276 },
277 "disable_trace": {
278 "type": [
279 "boolean"
280 ],
281 "docDefault": true,
282 "docDescription": "Enable or disable the transaction tracing"
283 },
284 "v8": {
285 "type": [
286 "boolean"
287 ]
288 },
289 "event_loop_inspector": {
290 "type": [
291 "boolean"
292 ]
293 },
294 "deep_monitoring": {
295 "type": [
296 "boolean"
297 ]
298 },
299 "increment_var": {
300 "type": "string",
301 "docDescription": "Specify the name of an environment variable to inject which increments for each cluster"
302 },
303 "instance_var": {
304 "type": "string",
305 "default": "NODE_APP_INSTANCE",
306 "docDefault": "NODE_APP_INSTANCE",
307 "docDescription": "Rename the NODE_APP_INSTANCE environment variable"
308 },
309 "pmx": {
310 "type": ["boolean", "string"],
311 "default": true,
312 "docDefault": "True",
313 "docDescription": "Enable or disable pmx wrapping"
314 },
315 "automation": {
316 "type": "boolean",
317 "default": true,
318 "docDefault": "True",
319 "docDescription": "Enable or disable pmx wrapping"
320 },
321 "treekill": {
322 "type": "boolean",
323 "default": true,
324 "docDefault": "True",
325 "docDescription": "Only kill the main process, not detached children"
326 },
327 "port": {
328 "type": "number",
329 "docDescription": "Shortcut to inject a PORT environment variable"
330 },
331 "username" : {
332 "type": "string",
333 "docDescription": "Current user that started the process"
334 },
335 "uid": {
336 "type" : [
337 "number",
338 "string"
339 ],
340 "alias": "user",
341 "docDefault": "Current user uid",
342 "docDescription": "Set user id"
343 },
344 "gid": {
345 "type" : [
346 "number",
347 "string"
348 ],
349 "docDefault": "Current user gid",
350 "docDescription": "Set group id"
351 },
352 "windowsHide": {
353 "type": "boolean",
354 "docDefault": "True",
355 "docDescription": "Enable or disable the Windows popup when starting an app",
356 "default": true
357 },
358 "kill_retry_time": {
359 "type": "number",
360 "default" : 100
361 },
362 "write": {
363 "type": "boolean"
364 },
365 "io": {
366 "type": "object",
367 "docDescription": "Specify apm values and configuration"
368 }
369}