schema.json 9.6 KB

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