2014-11-24 14:44:20 +08:00
{
"script" : {
"type" : "string" ,
2017-01-16 14:04:32 +01:00
"require" : true ,
2018-03-15 17:37:01 +01:00
"alias" : "exec" ,
"docDescription" : "Path of the script to launch, required field"
} ,
"name" : {
"type" : "string" ,
"docDefault" : "Script filename without the extension (app for app.js)" ,
"docDescription" : "Process name in the process list"
} ,
2018-09-24 22:55:18 +02:00
"name_prefix" : {
"type" : "string"
} ,
2020-04-12 16:50:03 +02:00
"filter_env" : {
"type" : [
"boolean" ,
"array" ,
"string"
] ,
"docDefault" : false ,
"docDescription" : "Enable filtering global environments"
} ,
2019-10-28 13:33:28 +05:30
"namespace" : {
"type" : "string" ,
"docDefault" : "default" ,
"docDescription" : "Process namespace"
} ,
2018-09-29 16:40:29 +02:00
"install_url" : {
"type" : "string"
} ,
2018-03-15 17:37:01 +01:00
"cwd" : {
"type" : "string" ,
"docDefault" : "CWD of the current environment (from your shell)" ,
"docDescription" : "Current working directory to start the process with"
2014-11-24 14:44:20 +08:00
} ,
"args" : {
"type" : [
"array" ,
"string"
2018-03-15 17:37:01 +01:00
] ,
"docDescription" : "Arguments to pass to the script"
} ,
"exec_interpreter" : {
"type" : "string" ,
"alias" : "interpreter" ,
"docDefault" : "node" ,
"docDescription" : "Interpreter absolute path"
2014-11-24 14:44:20 +08:00
} ,
"node_args" : {
"type" : [
"array" ,
"string"
2016-03-24 21:35:55 +01:00
] ,
2018-03-16 17:40:23 +01:00
"alias" : [ "interpreterArgs" , "interpreter_args" ] ,
2018-03-15 17:37:01 +01:00
"docDescription" : "Arguments to pass to the interpreter"
2014-11-24 14:44:20 +08:00
} ,
2018-03-15 17:37:01 +01:00
"out_file" : {
"type" : "string" ,
"alias" : [ "out" , "output" , "out_log" ] ,
"docDefault" : "~/.pm2/logs/<app_name>-out.log" ,
"docDescription" : "File path for stdout (each line is appended to this file)"
} ,
"error_file" : {
"type" : "string" ,
"alias" : [ "error" , "err" , "err_file" , "err_log" ] ,
"docDefault" : "~/.pm2/logs/<app_name>-error.err" ,
"docDescription" : "File path for stderr (each line is appended to this file)"
} ,
"log_file" : {
"type" : [
"boolean" ,
"string"
] ,
"alias" : "log" ,
"docDefault" : "/dev/null" ,
"docDescription" : "File path for combined stdout and stderr (each line is appended to this file)"
} ,
"disable_logs" : {
"type" : "boolean" ,
"docDefault" : false ,
"docDescription" : "Disable all logs storage"
} ,
"log_type" : {
"type" : "string" ,
"docDescription" : "Define a specific log output type, possible value: json"
} ,
"log_date_format" : {
"type" : "string" ,
2020-04-12 15:56:43 +02:00
"docDescription" : "Format for log timestamps in day.js format (eg YYYY-MM-DD HH:mm Z)"
2018-03-15 17:37:01 +01:00
} ,
2018-09-24 00:17:23 +02:00
"time" : {
"type" : "boolean"
} ,
2018-03-15 17:37:01 +01:00
"env" : {
"type" : [
"object" ,
"string"
] ,
"docDescription" : "Specify environment variables to be injected"
} ,
"^env_\\S*$" : {
"type" : [
"object" ,
"string"
] ,
"docDescription" : "Specify environment variables to be injected when using --env <env_name>"
2014-11-24 14:44:20 +08:00
} ,
"max_memory_restart" : {
"type" : [
"string" ,
"number"
] ,
"regex" : "^\\d+(G|M|K)?$" ,
"ext_type" : "sbyte" ,
2018-03-15 17:37:01 +01:00
"desc" : "it should be a NUMBER - byte, \"[NUMBER]G\"(Gigabyte), \"[NUMBER]M\"(Megabyte) or \"[NUMBER]K\"(Kilobyte)" ,
"docDescription" : "Restart the app if an amount of memory is exceeded (format: /[0-9](K|M|G)?/ K for KB, 'M' for MB, 'G' for GB, default to B)"
2014-11-24 14:44:20 +08:00
} ,
2018-03-15 17:37:01 +01:00
"pid_file" : {
"type" : "string" ,
"alias" : "pid" ,
"docDefault" : "~/.pm2/pids/app_name-id.pid" ,
"docDescription" : "File path where the pid of the started process is written by pm2"
2017-07-02 19:28:41 +02:00
} ,
2015-08-04 15:24:47 +02:00
"restart_delay" : {
2018-03-15 17:37:01 +01:00
"type" : "number" ,
"docDefault" : 0 ,
"docDescription" : "Time in ms to wait before restarting a crashing app"
2015-08-04 15:24:47 +02:00
} ,
2018-09-27 17:05:40 +02:00
"exp_backoff_restart_delay" : {
"type" : "number" ,
"docDefault" : 0 ,
"docDescription" : "Restart Time in ms to wait before restarting a crashing app"
} ,
2018-03-15 17:37:01 +01:00
"source_map_support" : {
"type" : "boolean" ,
"docDefault" : true ,
"docDescription" : "Enable or disable the source map support"
2016-02-29 17:09:34 +01:00
} ,
2018-03-15 17:37:01 +01:00
"disable_source_map_support" : {
"type" : "boolean" ,
"docDefault" : false ,
"docDescription" : "Enable or disable the source map support"
2016-10-26 18:53:05 +02:00
} ,
2018-03-15 17:37:01 +01:00
"wait_ready" : {
"type" : "boolean" ,
"docDefault" : false ,
"docDescription" : "Make the process wait for a process.send('ready')"
2016-02-28 22:32:03 +01:00
} ,
2014-11-24 14:44:20 +08:00
"instances" : {
2018-03-15 17:37:01 +01:00
"type" : "number" ,
"docDefault" : 1 ,
"docDescription" : "Number of instances to be started in cluster mode"
2014-11-24 14:44:20 +08:00
} ,
2015-12-14 18:46:48 +01:00
"kill_timeout" : {
2018-03-15 17:37:01 +01:00
"type" : "number" ,
"docDefault" : 1600 ,
"docDescription" : "Time in ms before sending the final SIGKILL signal after SIGINT"
2015-12-14 18:46:48 +01:00
} ,
2019-10-30 13:54:01 +01:00
"shutdown_with_message" : {
"type" : "boolean" ,
"docDefault" : false ,
"docDescription" : "Shutdown an application with process.send('shutdown') instead of process.kill(pid, SIGINT)"
} ,
2016-07-04 23:12:23 +02:00
"listen_timeout" : {
2018-03-15 17:37:01 +01:00
"type" : "number" ,
"docDescription" : "Time in ms before forcing a reload if app is still not listening/has still note sent ready"
2014-11-24 14:44:20 +08:00
} ,
"cron_restart" : {
2021-09-24 12:40:46 +02:00
"type" : [
"string" ,
"number"
] ,
2018-03-15 17:37:01 +01:00
"alias" : "cron" ,
"docDescription" : "A cron pattern to restart your app"
2014-11-24 14:44:20 +08:00
} ,
"merge_logs" : {
2016-03-24 21:35:55 +01:00
"type" : "boolean" ,
2018-03-15 17:37:01 +01:00
"alias" : "combine_logs" ,
"docDefault" : false ,
"docDescription" : "In cluster mode, merge each type of logs into a single file (instead of having one for each cluster)"
2014-11-24 14:44:20 +08:00
} ,
2018-03-15 17:37:01 +01:00
"vizion" : {
2015-12-15 02:07:25 +01:00
"type" : "boolean" ,
2018-03-15 17:37:01 +01:00
"default" : true ,
"docDefault" : "True" ,
"docDescription" : "Enable or disable the versioning metadatas (vizion library)"
2015-04-16 16:20:53 +02:00
} ,
2024-03-01 15:02:04 +01:00
"autostart" : {
"type" : "boolean" ,
"default" : true ,
"docDefault" : "True" ,
"docDescription" : "Enable or disable auto start when adding process"
} ,
2018-03-15 17:37:01 +01:00
"autorestart" : {
2015-12-15 02:07:25 +01:00
"type" : "boolean" ,
2018-03-15 17:37:01 +01:00
"default" : true ,
"docDefault" : "True" ,
"docDescription" : "Enable or disable auto restart after process failure"
2015-06-26 14:52:32 +02:00
} ,
2022-03-18 23:40:40 +00:00
"stop_exit_codes" : {
"type" : [
"array" ,
"number"
] ,
"docDescription" : "List of exit codes that should allow the process to stop (skip autorestart)."
} ,
2018-09-23 19:28:13 +02:00
"watch_delay" : {
"type" : "number" ,
"docDefault" : "True" ,
"docDescription" : "Restart delay on file change detected"
} ,
2014-11-24 14:44:20 +08:00
"watch" : {
2014-11-25 18:14:27 +01:00
"type" : [
"boolean" ,
"array" ,
"string"
2018-03-15 17:37:01 +01:00
] ,
"docDefault" : false ,
"docDescription" : "Enable or disable the watch mode"
2014-11-24 14:44:20 +08:00
} ,
"ignore_watch" : {
"type" : [
"array" ,
"string"
2018-03-15 17:37:01 +01:00
] ,
"docDescription" : "List of paths to ignore (regex)"
2014-11-24 14:44:20 +08:00
} ,
2015-01-28 22:55:32 +01:00
"watch_options" : {
2018-03-15 17:37:01 +01:00
"type" : "object" ,
"docDescription" : "Object that will be used as an options with chokidar (refer to chokidar documentation)"
2014-11-24 14:44:20 +08:00
} ,
"min_uptime" : {
"type" : [
"number" ,
"string"
] ,
"regex" : "^\\d+(h|m|s)?$" ,
"desc" : "it should be a NUMBER - milliseconds, \"[NUMBER]h\"(hours), \"[NUMBER]m\"(minutes) or \"[NUMBER]s\"(seconds)" ,
"min" : 100 ,
2018-03-15 17:37:01 +01:00
"ext_type" : "stime" ,
"docDefault" : 1000 ,
"docDescription" : "Minimum uptime of the app to be considered started (format is /[0-9]+(h|m|s)?/, for hours, minutes, seconds, docDefault to ms)"
2014-11-24 14:44:20 +08:00
} ,
"max_restarts" : {
"type" : "number" ,
2018-03-15 17:37:01 +01:00
"min" : 0 ,
"docDefault" : 16 ,
"docDescription" : "Number of times a script is restarted when it exits in less than min_uptime"
2014-11-24 14:44:20 +08:00
} ,
2018-09-20 14:10:37 +02:00
"execute_command" : {
"type" : "boolean"
} ,
2014-11-24 14:44:20 +08:00
"exec_mode" : {
"type" : "string" ,
"regex" : "^(cluster|fork)(_mode)?$" ,
2018-03-15 17:37:01 +01:00
"desc" : "it should be \"cluster\"(\"cluster_mode\") or \"fork\"(\"fork_mode\") only" ,
"docDefault" : "fork" ,
"docDescription" : "Set the execution mode, possible values: fork|cluster"
2014-11-24 14:44:20 +08:00
} ,
"force" : {
2018-03-15 17:37:01 +01:00
"type" : "boolean" ,
"docDefault" : false ,
"docDescription" : "Start a script even if it is already running (only the script path is considered)"
2014-11-24 17:16:26 +08:00
} ,
2017-01-24 17:37:35 +01:00
"append_env_to_name" : {
2018-03-15 17:37:01 +01:00
"type" : "boolean" ,
"docDefault" : false ,
"docDescription" : "Append the environment name to the app name"
2017-01-23 00:28:53 +05:30
} ,
2014-11-24 17:16:26 +08:00
"post_update" : {
2018-03-15 17:37:01 +01:00
"type" : "array" ,
"docDescription" : "List of commands executed after a pull/upgrade operation performed from Keymetrics dashboard"
2017-01-04 17:02:11 +01:00
} ,
2018-03-15 17:37:01 +01:00
"trace" : {
2017-01-17 15:25:43 +01:00
"type" : [
"boolean"
2018-03-15 17:37:01 +01:00
] ,
"docDefault" : false ,
"docDescription" : "Enable or disable the transaction tracing"
2017-01-17 15:25:43 +01:00
} ,
"disable_trace" : {
2017-01-06 16:22:07 +01:00
"type" : [
"boolean"
2018-03-15 17:37:01 +01:00
] ,
"docDefault" : true ,
"docDescription" : "Enable or disable the transaction tracing"
2017-06-06 15:49:43 +02:00
} ,
2018-01-31 15:08:31 +01:00
"v8" : {
"type" : [
"boolean"
]
} ,
2018-02-02 18:07:50 +01:00
"event_loop_inspector" : {
2018-02-02 14:56:23 +01:00
"type" : [
"boolean"
]
} ,
2018-02-05 15:10:21 +01:00
"deep_monitoring" : {
"type" : [
"boolean"
]
} ,
2017-06-06 15:49:43 +02:00
"increment_var" : {
2018-03-15 17:37:01 +01:00
"type" : "string" ,
"docDescription" : "Specify the name of an environment variable to inject which increments for each cluster"
2017-06-06 15:57:32 +02:00
} ,
"instance_var" : {
"type" : "string" ,
2018-03-15 17:37:01 +01:00
"default" : "NODE_APP_INSTANCE" ,
"docDefault" : "NODE_APP_INSTANCE" ,
"docDescription" : "Rename the NODE_APP_INSTANCE environment variable"
} ,
"pmx" : {
2021-01-13 12:31:05 +01:00
"type" : [ "boolean" , "string" ] ,
2018-03-15 17:37:01 +01:00
"default" : true ,
"docDefault" : "True" ,
"docDescription" : "Enable or disable pmx wrapping"
} ,
"automation" : {
"type" : "boolean" ,
"default" : true ,
"docDefault" : "True" ,
"docDescription" : "Enable or disable pmx wrapping"
} ,
"treekill" : {
"type" : "boolean" ,
"default" : true ,
"docDefault" : "True" ,
2018-06-03 20:53:09 +02:00
"docDescription" : "Only kill the main process, not detached children"
2018-03-15 17:37:01 +01:00
} ,
"port" : {
"type" : "number" ,
"docDescription" : "Shortcut to inject a PORT environment variable"
} ,
2018-06-03 20:53:09 +02:00
"username" : {
"type" : "string" ,
"docDescription" : "Current user that started the process"
} ,
2018-03-15 17:37:01 +01:00
"uid" : {
2019-05-06 18:02:57 +03:00
"type" : [
"number" ,
"string"
] ,
2018-09-23 17:48:27 +02:00
"alias" : "user" ,
2018-03-15 17:37:01 +01:00
"docDefault" : "Current user uid" ,
2018-06-03 20:53:09 +02:00
"docDescription" : "Set user id"
2018-03-15 17:37:01 +01:00
} ,
"gid" : {
2019-05-06 18:02:57 +03:00
"type" : [
"number" ,
"string"
] ,
2018-03-15 17:37:01 +01:00
"docDefault" : "Current user gid" ,
2018-06-03 20:53:09 +02:00
"docDescription" : "Set group id"
2018-03-15 17:37:01 +01:00
} ,
2018-02-13 11:54:23 -05:00
"windowsHide" : {
"type" : "boolean" ,
2018-03-15 17:37:01 +01:00
"docDefault" : "True" ,
"docDescription" : "Enable or disable the Windows popup when starting an app" ,
"default" : true
2018-03-16 10:07:48 +09:00
} ,
"kill_retry_time" : {
"type" : "number" ,
"default" : 100
2018-03-19 09:37:28 +01:00
} ,
2018-03-15 17:37:01 +01:00
"write" : {
"type" : "boolean"
2018-06-15 16:59:27 +02:00
} ,
"io" : {
"type" : "object" ,
"docDescription" : "Specify apm values and configuration"
2014-11-24 14:44:20 +08:00
}
}