Skip to content

Commit

Permalink
chore: revert PR #3496
Browse files Browse the repository at this point in the history
  • Loading branch information
wallet77 committed Mar 5, 2018
1 parent 9f2c4ca commit aae1d55
Showing 1 changed file with 108 additions and 176 deletions.
284 changes: 108 additions & 176 deletions lib/API/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,87 +2,23 @@
"script": {
"type": "string",
"require": true,
"alias" : "exec",
"description": "Path of the script to launch, required field"
},
"name": {
"type": "string",
"default": "Script filename without the extension (app for app.js)",
"description": "Process name in the process list"
},
"cwd": {
"type": "string",
"default": "CWD of the current environment (from your shell)",
"description": "Current working directory to start the process with"
"alias" : "exec"
},
"args": {
"type": [
"array",
"string"
],
"description": "Arguments to pass to the script"
},
"interpreter": {
"type": "string",
"alias": "exec_interpreter",
"default": "node",
"description": "Interpreter absolute path"
]
},
"node_args": {
"type": [
"array",
"string"
],
"alias": ["interpreter_args"],
"description": "Arguments to pass to the interpreter"
},
"output": {
"type": "string",
"alias": ["out", "out_file", "out_log"],
"default": "~/.pm2/logs/<app_name>-out.log",
"description": "File path for stdout (each line is appended to this file)"
"alias": ["interpreterArgs", "interpreter_args"]
},
"error": {
"type": "string",
"alias": ["error_file", "err", "err_file", "err_log"],
"default": "~/.pm2/logs/<app_name>-error.err",
"description": "File path for stderr (each line is appended to this file)"
},
"log": {
"type": [
"boolean",
"string"
],
"default": "/dev/null",
"alias": "log_file",
"description": "File path for combined stdout and stderr (each line is appended to this file)"
},
"disable_logs": {
"type": "boolean",
"default": false,
"description": "Disable all logs storage"
},
"log_type": {
"type": "string",
"description": "Define a specific log output type, possible values: json|"
},
"log_date_format": {
"type": "string",
"description": "Format for log timestamps (eg YYYY-MM-DD HH:mm Z) in moment.js format"
},
"env": {
"type": [
"object",
"string"
],
"description": "Specify environment variables to be injected"
},
"^env_\\S*$": {
"type": [
"object",
"string"
],
"description": "Specify environment variables to be injected when using --env <env_name>"
"name": {
"type": "string"
},
"max_memory_restart": {
"type": [
Expand All @@ -91,89 +27,124 @@
],
"regex": "^\\d+(G|M|K)?$",
"ext_type": "sbyte",
"desc": "it should be a NUMBER - byte, \"[NUMBER]G\"(Gigabyte), \"[NUMBER]M\"(Megabyte) or \"[NUMBER]K\"(Kilobyte)",
"description": "Restart the app if an amount of memory is exceeded (format: 'K|G|' for KB, 'M' for MB, 'G' for GB, default to byte)"
"desc": "it should be a NUMBER - byte, \"[NUMBER]G\"(Gigabyte), \"[NUMBER]M\"(Megabyte) or \"[NUMBER]K\"(Kilobyte)"
},
"pid_file": {
"type": "string",
"alias": "pid",
"default": "~/.pm2/pids/app_name-id.pid",
"description": "File path where the pid of the started process is written by pm2"
"uid" : {
"type" : "string"
},
"gid" : {
"type" : "string"
},
"restart_delay": {
"type" : "number",
"default": 0,
"description": "Time in ms to wait before restarting a crashing app"
"type" : "number"
},
"source_map_support": {
"type": "boolean",
"default": true,
"description": "Enable or disable the source map support"
"source_map_support" : {
"type": "boolean"
},
"disable_source_map_support": {
"type": "boolean",
"default": false,
"description": "Enable or disable the source map support"
"wait_ready" : {
"type": "boolean"
},
"wait_ready": {
"type": "boolean",
"default": false,
"description": "Make the process wait for a process.send('ready')"
"disable_source_map_support" : {
"type": "boolean"
},
"instances": {
"type": "number",
"default": 1,
"description": "Number of instances to be started in cluster mode"
"type": "number"
},
"kill_timeout": {
"type": "number",
"default": 1600,
"description": "Time in ms before sending the final SIGKILL signal after SIGINT"
"type": "number"
},
"listen_timeout": {
"type": "number",
"description": "Time in ms before forcing a reload if app is still not listening/has still note sent ready"
"type": "number"
},
"port": {
"type": "number"
},
"log_file": {
"type": [
"boolean",
"string"
],
"alias": "log"
},
"error_file": {
"type": "string",
"alias": ["error", "err", "err_file", "err_log"]
},
"log_type": {
"type": "string"
},
"out_file": {
"type": "string",
"alias": ["output", "out", "out_log"]
},
"pid_file": {
"type": "string",
"alias": "pid"
},
"cron_restart": {
"type": "string",
"alias": "cron",
"description": "A cron pattern to restart your app"
"alias": "cron"
},
"cwd": {
"type": "string"
},
"merge_logs": {
"type": "boolean",
"alias" : "combine_logs",
"default": false,
"description": "In cluster mode, merge each type of logs into a single file (instead of having one for each cluster)"
"alias" : "combine_logs"
},
"vizion" : {
"type": "boolean",
"default" : true
},
"vizion": {
"pmx" : {
"type": "boolean",
"default" : true,
"description": "Enable or disable the versioning metadatas (vizion library)"
"default" : true
},
"automation" : {
"type": "boolean",
"default" : true
},
"autorestart" : {
"type": "boolean",
"default" : true
},
"autorestart": {
"treekill" : {
"type": "boolean",
"default" : true,
"description": "Enable or disable auto restart after process failure"
"default" : true
},
"watch": {
"type": [
"boolean",
"array",
"string"
],
"default": false,
"description": "Enable or disable the watch mode"
]
},
"ignore_watch": {
"type": [
"array",
"string"
],
"description": "List of paths to ignore (regex)"
]
},
"watch_options": {
"type": "object",
"description": "Object that will be used as an options with chokidar (refer to chokidar documentation)"
"type": "object"
},
"env": {
"type": [
"object",
"string"
]
},
"^env_\\S*$": {
"type": [
"object",
"string"
]
},
"disable_logs" : {
"type": "boolean"
},
"log_date_format": {
"type": "string"
},
"min_uptime": {
"type": [
Expand All @@ -183,51 +154,43 @@
"regex": "^\\d+(h|m|s)?$",
"desc": "it should be a NUMBER - milliseconds, \"[NUMBER]h\"(hours), \"[NUMBER]m\"(minutes) or \"[NUMBER]s\"(seconds)",
"min": 100,
"ext_type": "stime",
"default": 1000,
"description": "Minimum uptime of the app to be considered started (format is [0-9]+(h|m|s)?, for hours, minutes, seconds, default to ms)"
"ext_type": "stime"
},
"max_restarts": {
"type": "number",
"min": 0,
"default": 16,
"description": "Number of times a script is restarted when it exits in less than min_uptime"
"min": 0
},
"exec_mode": {
"type": "string",
"regex": "^(cluster|fork)(_mode)?$",
"alias": "executeCommand",
"desc": "it should be \"cluster\"(\"cluster_mode\") or \"fork\"(\"fork_mode\") only",
"default": "fork",
"description": "Set the execution mode, possible values: fork|cluster"
"desc": "it should be \"cluster\"(\"cluster_mode\") or \"fork\"(\"fork_mode\") only"
},
"exec_interpreter": {
"type": "string",
"alias": "interpreter"
},
"write": {
"type": "boolean"
},
"force": {
"type": "boolean",
"default": false,
"description": "Start a script even if it is already running (only the script path is considered)"
"type": "boolean"
},
"append_env_to_name": {
"type": "boolean",
"default": false,
"description": "Append the environment name to the app name"
"type": "boolean"
},
"post_update": {
"type": "array",
"description": "List of commands executed after a pull/upgrade operation performed from Keymetrics dashboard"
"type": "array"
},
"trace": {
"disable_trace": {
"type": [
"boolean"
],
"default": false,
"description": "Enable or disable the transaction tracing"
]
},
"disable_trace": {
"trace": {
"type": [
"boolean"
],
"default": true,
"description": "Enable or disable the transaction tracing"
]
},
"v8": {
"type": [
Expand All @@ -245,45 +208,14 @@
]
},
"increment_var": {
"type": "string",
"description": "Specify the name of an environnement variable to inject which increments for each cluster"
"type": "string"
},
"instance_var": {
"type": "string",
"default" : "NODE_APP_INSTANCE",
"description": "Rename the NODE_APP_INSTANCE environment variable"
},
"pmx": {
"type": "boolean",
"default" : true,
"description": "Enable or disable pmx wrapping"
},
"automation": {
"type": "boolean",
"default" : true,
"description": "Enable or disable pmx wrapping"
},
"treekill": {
"type": "boolean",
"default" : true,
"description": "Only kill the main process, not detached children"
},
"port": {
"type": "number",
"description": "Shortcut to inject a PORT environment variable"
},
"uid": {
"type" : "string",
"default": "Current user uid",
"description": "Set user id"
},
"gid": {
"type" : "string",
"default": "Current user gid",
"description": "Set group id"
"default" : "NODE_APP_INSTANCE"
},
"windowsHide": {
"type": "boolean",
"default" : true
}
}
}

0 comments on commit aae1d55

Please sign in to comment.