Type object
File match ecosystem.json ecosystem.yml ecosystem.yaml ecosystem.config.json ecosystem.config.yml ecosystem.config.yaml
Schema URL https://catalog.lintel.tools/schemas/schemastore/ecosystem-json/latest.json
Source https://www.schemastore.org/pm2-ecosystem.json

Validate with Lintel

npx @lintel/lintel check
Type: object

Properties

apps app[]

The apps property is an array of object where each object contains the configuration for each process.

deploy object

The deploy property is an object where each of its properties is an object which defines a deployment environment.

3 nested properties
production object
11 nested properties
key string

SSH key path. Defaults to $HOME/.ssh

user string

SSH user

host string | string[]

SSH host

ssh_options string | string[]

SSH options with no command-line flag, see 'man ssh'

ref string

GIT remote/branch

repo string

GIT remote

path string

path in the server

pre-setup string

Pre-setup command or path to a script on your local machine

post-setup string

Post-setup commands or path to a script on the host machine

pre-deploy-local string

pre-deploy action

post-deploy string

post-deploy action

staging object
11 nested properties
key string

SSH key path. Defaults to $HOME/.ssh

user string

SSH user

host string | string[]

SSH host

ssh_options string | string[]

SSH options with no command-line flag, see 'man ssh'

ref string

GIT remote/branch

repo string

GIT remote

path string

path in the server

pre-setup string

Pre-setup command or path to a script on your local machine

post-setup string

Post-setup commands or path to a script on the host machine

pre-deploy-local string

pre-deploy action

post-deploy string

post-deploy action

development object
11 nested properties
key string

SSH key path. Defaults to $HOME/.ssh

user string

SSH user

host string | string[]

SSH host

ssh_options string | string[]

SSH options with no command-line flag, see 'man ssh'

ref string

GIT remote/branch

repo string

GIT remote

path string

path in the server

pre-setup string

Pre-setup command or path to a script on your local machine

post-setup string

Post-setup commands or path to a script on the host machine

pre-deploy-local string

pre-deploy action

post-deploy string

post-deploy action

Definitions

app object
script string required

Path of the script to launch

name string

Process name in the process list. Defaults to script filename without the extension (app for app.js)

cwd string

Current working directory to start the process with. Defaults to CWD of the current environment (from your shell)

args string | string[]

Arguments to pass to the script

interpreter string

Interpreter absolute path. Defaults to node

interpreter_args string | string[]

Options to pass to the interpreter

error_file string

File path for stderr (each line is appended to this file)

Default: "~/.pm2/logs/<app_name>-error.err"
out_file string

File path for stdout (each line is appended to this file)

Default: "~/.pm2/logs/<app_name>-out.log"
combine_logs boolean

If set to true, avoid to suffix logs file with the process id

Default: "/dev/null"
merge_logs boolean

Alias to combine_logs

pid_file string

File path where the pid of the started process is written by pm2. Defaults to ~/.pm2/pids/app_name-id.pid

disable_logs boolean

Disable all logs storage

log_type string

Define a specific log output type

Values: "json"
log_date_format string

Format for log timestamps in moment.js format (eg YYYY-MM-DD HH:mm Z)

env Record<string, string>

Specify environment variables to be injected

env_ Record<string, string>

Specify environment variables to be injected (when passing --env)

max_memory_restart number

Restart the app if an amount of memory is exceeded (format: /0-9?/ K for KB, 'M' for MB, 'G' for GB, default to B)

restart_delay number

Time in ms to wait before restarting a crashing app

source_map_support boolean

Enable or disable the source map support

Default: true
disable_source_map_support boolean

Enable or disable the source map support

wait_ready boolean

Make the process wait for a process.send('ready')

instances number

Number of instances to be started in cluster mode

Default: 1
kill_timeout number

Time in ms before sending the final SIGKILL signal after SIGINT

Default: 1600
listen_timeout number

Time in ms before forcing a reload if app is still not listening/has still not sent ready

cron_restart string

A cron pattern to restart your app

vizion boolean

Enable or disable the versioning metadatas (vizion library)

Default: true
autorestart boolean

Enable or disable auto restart after process failure

Default: true
watch boolean

Enable or disable the watch mode

ignore_watch string | string[]

List of paths to ignore (regex)

watch_options object

Object that will be used as an options with chokidar (refer to chokidar documentation)

min_uptime number

Minimum uptime of the app to be considered started (format is /[0-9]+(h|m|s)?/, for hours, minutes, seconds, default to ms)

Default: 1000
max_restarts number

Number of times a script is restarted when it exits in less than min_uptime

Default: 16
exec_mode string

Set the execution mode

Default: "fork"
Values: "fork" "cluster"
force boolean

Start a script even if it is already running (only the script path is considered)

append_env_to_name boolean

Append the environment name to the app name

post_update string[]

List of commands executed after a pull/upgrade operation performed from Keymetrics dashboard

shutdown_with_message boolean

Shutdown an application with process.send('shutdown') instead of process.kill(pid, SIGINT)

trace boolean

Enable or disable the transaction tracing

disable_trace boolean

Enable or disable the transaction tracing

Default: true
increment_var string

Specify the name of an environment variable to inject which increments for each cluster

instance_var string

Rename the NODE_APP_INSTANCE environment variable. Defaults to NODE_APP_INSTANCE

filter_env string[]

Excludes global variables starting with "REACT_" and will not allow their penetration into the cluster

pmx boolean

Enable or disable apm wrapping

Default: true
automation boolean

Enable or disable apm wrapping

Default: true
treekill boolean

Only kill the main process, not detached children

Default: true
port number

Shortcut to inject a PORT environment variable

uid string

Set user id. Defaults to current user uid

gid string

Set group id. Defaults to current user gid

deploymentEnvironment object
key string

SSH key path. Defaults to $HOME/.ssh

user string

SSH user

host string | string[]

SSH host

ssh_options string | string[]

SSH options with no command-line flag, see 'man ssh'

ref string

GIT remote/branch

repo string

GIT remote

path string

path in the server

pre-setup string

Pre-setup command or path to a script on your local machine

post-setup string

Post-setup commands or path to a script on the host machine

pre-deploy-local string

pre-deploy action

post-deploy string

post-deploy action