forked from directus/directus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathecosystem.config.cjs
32 lines (29 loc) · 879 Bytes
/
ecosystem.config.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
* pm2 ecosystem options
* See https://pm2.keymetrics.io/docs/usage/application-declaration/
*
* Attributes down below are in order of the above linked documentation
*/
module.exports = [
{
// General
name: 'directus',
script: 'cli.js',
args: ['start'],
// General
instances: process.env.PM2_INSTANCES ?? 1,
exec_mode: process.env.PM2_EXEC_MODE ?? 'cluster',
max_memory_restart: process.env.PM2_MAX_MEMORY_RESTART,
// Control flow
min_uptime: process.env.PM2_MIN_UPTIME,
listen_timeout: process.env.PM2_LISTEN_TIMEOUT,
kill_timeout: process.env.PM2_KILL_TIMEOUT,
wait_ready: true,
max_restarts: process.env.PM2_MAX_RESTARTS,
restart_delay: process.env.PM2_RESTART_DELAY ?? 0,
autorestart: process.env.PM2_AUTO_RESTART === 'true',
// Logs
error_file: process.env.PM2_LOG_ERROR_FILE,
out_file: process.env.PM2_LOG_OUT_FILE,
},
];