Files
api/api/ecosystem.config.json
Pujit Mehrotra b53bb3f197 fix(api): pm2 start script & limit auto restarts (#1040)
* fix(api): limit auto restarts to 10

so persistent errors (e.g. during server boot) don't cause an infinite
loop that's difficult for users to see

* fix(api): invoke js directly from pm2 instead of npm script

npm script wraps it in a child process, so we lose ipc.

* fix(api): update api key service test for ensureDir change

* chore: increase max_restart threshold to 10s per cycle
2025-01-14 14:27:00 -05:00

21 lines
542 B
JSON

{
"apps": [
{
"name": "unraid-api",
"script": "./dist/main.js",
"cwd": "/usr/local/unraid-api",
"log": "/var/log/unraid-api/unraid-api.log",
"exec_mode": "fork",
"wait_ready": true,
"listen_timeout": 30000,
"max_restarts": 10,
"min_uptime": 10000,
"ignore_watch": [
"node_modules",
"src",
".env.*",
"myservers.cfg"
]
}
]
}