-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathecosystem.config.cjs
More file actions
46 lines (41 loc) · 1.24 KB
/
ecosystem.config.cjs
File metadata and controls
46 lines (41 loc) · 1.24 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
module.exports = {
apps: [
{
name: "sovereign",
cwd: __dirname,
script: "platform/index.cjs",
interpreter: "node",
node_args: [
"--import",
"./platform/scripts/register-alias.mjs",
// Create /etc/sovereign.env with KEY=VALUE lines (no quotes)
// "--env-file=/etc/sovereign.env"
],
// Keep 1 process with SQLite; go cluster when you switch to Postgres.
instances: 1,
exec_mode: "fork",
watch: false,
// Restart hygiene
autorestart: true,
restart_delay: 2000, // 2s between restarts
exp_backoff_restart_delay: 100, // exponential backoff base
max_memory_restart: "512M", // restart on leak
// Graceful lifecycle
kill_timeout: 5000, // give app up to 5s to close on SIGINT/SIGTERM
listen_timeout: 8000, // wait for the app to start listening
// Logs
merge_logs: true,
out_file: "./logs/sovereign.out.log",
error_file: "./logs/sovereign.err.log",
log_date_format: "YYYY-MM-DD HH:mm:ss Z",
// Defaults; overridden by --env-file above
env: {
NODE_ENV: "production",
PORT: "4000",
},
env_production: {
NODE_ENV: "production",
},
},
],
};