feat: supervise worker with pm2 instead of cron PID-check

Passenger only manages the Next.js app process; the worker now gets
the same crash-recovery/auto-restart via pm2, replacing the cron-driven
PID-file restart hack. Updates README deployment steps accordingly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-11 14:49:49 +02:00
co-authored by Claude Sonnet 5
parent 65f92abe7b
commit 2b5f68752f
6 changed files with 807 additions and 62 deletions
+6 -1
View File
@@ -13,7 +13,11 @@
"test": "jest",
"worker": "tsx worker/index.ts",
"worker:cleanup": "tsx worker/cron-cleanup.ts",
"worker:check": "tsx worker/cron-check.ts",
"worker:pm2:start": "pm2 start ecosystem.config.cjs",
"worker:pm2:stop": "pm2 stop ecosystem.config.cjs",
"worker:pm2:restart": "pm2 restart ecosystem.config.cjs",
"worker:pm2:status": "pm2 status ombrora-worker",
"worker:pm2:logs": "pm2 logs ombrora-worker",
"db:migrate": "prisma migrate dev",
"db:generate": "prisma generate"
},
@@ -40,6 +44,7 @@
"next": "^16.3.0",
"next-intl": "^4.13.6",
"next-themes": "^0.4.6",
"pm2": "^7.0.3",
"prisma": "^7.9.1",
"react": "^19.2.8",
"react-dom": "^19.2.8"