feat(pm2): update PM2 configuration and introduce new start script
Deploy to Raspberry Pi / deploy (push) Canceled after 37s
Deploy to Raspberry Pi / deploy (push) Canceled after 37s
- Updated PM2 version to 6.0.14 in package.json and pnpm-lock.yaml for improved stability. - Changed interpreter for PM2 processes to use `process.execPath` for consistency. - Added a new `start:pm2` script in package.json to streamline PM2 process management. - Updated README to reflect changes in PM2 usage and instructions for starting the application.
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
* Starts always-on processes only; HTTP (:8700) and workers are owned by
|
||||
* control.js via PM2 (same as `pnpm dev:pm2`).
|
||||
*
|
||||
* Use `pnpm start:pm2` (in-tree PM2 6.x). Do not use a global `pm2` 7.x —
|
||||
* a CLI/daemon version mismatch pegs CPU even with instances: 1.
|
||||
*
|
||||
* Prerequisites: `pnpm build` (packages/web/dist), Redis, .env secrets.
|
||||
*/
|
||||
const fs = require("fs");
|
||||
@@ -41,7 +44,7 @@ module.exports = {
|
||||
name: "jflow-control",
|
||||
cwd: root,
|
||||
script: "packages/server/control.js",
|
||||
interpreter: "node",
|
||||
interpreter: process.execPath,
|
||||
instances: 1,
|
||||
exec_mode: "fork",
|
||||
autorestart: true,
|
||||
@@ -55,7 +58,7 @@ module.exports = {
|
||||
name: "jflow-web",
|
||||
cwd: root,
|
||||
script: "packages/server/web-server.js",
|
||||
interpreter: "node",
|
||||
interpreter: process.execPath,
|
||||
instances: 1,
|
||||
exec_mode: "fork",
|
||||
autorestart: true,
|
||||
|
||||
Reference in New Issue
Block a user