UNPKG

9.76 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": "string",
172 "alias": "cron",
173 "docDescription": "A cron pattern to restart your app"
174 },
175 "merge_logs": {
176 "type": "boolean",
177 "alias" : "combine_logs",
178 "docDefault": false,
179 "docDescription": "In cluster mode, merge each type of logs into a single file (instead of having one for each cluster)"
180 },
181 "vizion": {
182 "type": "boolean",
183 "default" : true,
184 "docDefault" : "True",
185 "docDescription": "Enable or disable the versioning metadatas (vizion library)"
186 },
187 "autorestart": {
188 "type": "boolean",
189 "default": true,
190 "docDefault": "True",
191 "docDescription": "Enable or disable auto restart after process failure"
192 },
193 "watch_delay": {
194 "type": "number",
195 "docDefault": "True",
196 "docDescription": "Restart delay on file change detected"
197 },
198 "watch": {
199 "type": [
200 "boolean",
201 "array",
202 "string"
203 ],
204 "docDefault": false,
205 "docDescription": "Enable or disable the watch mode"
206 },
207 "ignore_watch": {
208 "type": [
209 "array",
210 "string"
211 ],
212 "docDescription": "List of paths to ignore (regex)"
213 },
214 "watch_options": {
215 "type": "object",
216 "docDescription": "Object that will be used as an options with chokidar (refer to chokidar documentation)"
217 },
218 "min_uptime": {
219 "type": [
220 "number",
221 "string"
222 ],
223 "regex": "^\\d+(h|m|s)?$",
224 "desc": "it should be a NUMBER - milliseconds, \"[NUMBER]h\"(hours), \"[NUMBER]m\"(minutes) or \"[NUMBER]s\"(seconds)",
225 "min": 100,
226 "ext_type": "stime",
227 "docDefault": 1000,
228 "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)"
229 },
230 "max_restarts": {
231 "type": "number",
232 "min": 0,
233 "docDefault": 16,
234 "docDescription": "Number of times a script is restarted when it exits in less than min_uptime"
235 },
236 "execute_command": {
237 "type": "boolean"
238 },
239 "exec_mode": {
240 "type": "string",
241 "regex": "^(cluster|fork)(_mode)?$",
242 "desc": "it should be \"cluster\"(\"cluster_mode\") or \"fork\"(\"fork_mode\") only",
243 "docDefault": "fork",
244 "docDescription": "Set the execution mode, possible values: fork&#124;cluster"
245 },
246 "force": {
247 "type": "boolean",
248 "docDefault": false,
249 "docDescription": "Start a script even if it is already running (only the script path is considered)"
250 },
251 "append_env_to_name": {
252 "type": "boolean",
253 "docDefault": false,
254 "docDescription": "Append the environment name to the app name"
255 },
256 "post_update": {
257 "type": "array",
258 "docDescription": "List of commands executed after a pull/upgrade operation performed from Keymetrics dashboard"
259 },
260 "trace": {
261 "type": [
262 "boolean"
263 ],
264 "docDefault": false,
265 "docDescription": "Enable or disable the transaction tracing"
266 },
267 "disable_trace": {
268 "type": [
269 "boolean"
270 ],
271 "docDefault": true,
272 "docDescription": "Enable or disable the transaction tracing"
273 },
274 "v8": {
275 "type": [
276 "boolean"
277 ]
278 },
279 "event_loop_inspector": {
280 "type": [
281 "boolean"
282 ]
283 },
284 "deep_monitoring": {
285 "type": [
286 "boolean"
287 ]
288 },
289 "increment_var": {
290 "type": "string",
291 "docDescription": "Specify the name of an environment variable to inject which increments for each cluster"
292 },
293 "instance_var": {
294 "type": "string",
295 "default": "NODE_APP_INSTANCE",
296 "docDefault": "NODE_APP_INSTANCE",
297 "docDescription": "Rename the NODE_APP_INSTANCE environment variable"
298 },
299 "pmx": {
300 "type": ["boolean", "string"],
301 "default": true,
302 "docDefault": "True",
303 "docDescription": "Enable or disable pmx wrapping"
304 },
305 "automation": {
306 "type": "boolean",
307 "default": true,
308 "docDefault": "True",
309 "docDescription": "Enable or disable pmx wrapping"
310 },
311 "treekill": {
312 "type": "boolean",
313 "default": true,
314 "docDefault": "True",
315 "docDescription": "Only kill the main process, not detached children"
316 },
317 "port": {
318 "type": "number",
319 "docDescription": "Shortcut to inject a PORT environment variable"
320 },
321 "username" : {
322 "type": "string",
323 "docDescription": "Current user that started the process"
324 },
325 "uid": {
326 "type" : [
327 "number",
328 "string"
329 ],
330 "alias": "user",
331 "docDefault": "Current user uid",
332 "docDescription": "Set user id"
333 },
334 "gid": {
335 "type" : [
336 "number",
337 "string"
338 ],
339 "docDefault": "Current user gid",
340 "docDescription": "Set group id"
341 },
342 "windowsHide": {
343 "type": "boolean",
344 "docDefault": "True",
345 "docDescription": "Enable or disable the Windows popup when starting an app",
346 "default": true
347 },
348 "kill_retry_time": {
349 "type": "number",
350 "default" : 100
351 },
352 "write": {
353 "type": "boolean"
354 },
355 "io": {
356 "type": "object",
357 "docDescription": "Specify apm values and configuration"
358 }
359}