From 878f5401d78f5915df8ef2ee2875135836335ccc Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 23 May 2022 19:13:02 +0100 Subject: [PATCH] updating pm2 config files to be named correctly so commands are picked up --- packages/server/package.json | 2 +- packages/server/{pm2.js => pm2.config.js} | 2 +- packages/worker/package.json | 2 +- packages/worker/{pm2.js => pm2.config.js} | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename packages/server/{pm2.js => pm2.config.js} (81%) rename packages/worker/{pm2.js => pm2.config.js} (75%) diff --git a/packages/server/package.json b/packages/server/package.json index 4b89a11bf2..d052651b69 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -18,7 +18,7 @@ "build:docker": "yarn run predocker && docker build . -t app-service --label version=$BUDIBASE_RELEASE_VERSION", "build:docs": "node ./scripts/docs/generate.js open", "run:docker": "node dist/index.js", - "run:docker:cluster": "pm2-runtime start pm2.js", + "run:docker:cluster": "pm2-runtime start pm2.config.js", "dev:stack:up": "node scripts/dev/manage.js up", "dev:stack:down": "node scripts/dev/manage.js down", "dev:stack:nuke": "node scripts/dev/manage.js nuke", diff --git a/packages/server/pm2.js b/packages/server/pm2.config.js similarity index 81% rename from packages/server/pm2.js rename to packages/server/pm2.config.js index 33829f327c..31cbab5d6c 100644 --- a/packages/server/pm2.js +++ b/packages/server/pm2.config.js @@ -2,7 +2,7 @@ module.exports = { apps: [ { script: "dist/index.js", - instances: "max", + instances: "4", exec_mode: "cluster", }, ], diff --git a/packages/worker/package.json b/packages/worker/package.json index e8fc824080..238dd5b6e2 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -15,7 +15,7 @@ "build": "rimraf dist/ && tsc", "postbuild": "copyfiles -u 1 src/**/*.hbs dist/", "run:docker": "node dist/index.js", - "run:docker:cluster": "pm2-runtime start pm2.js", + "run:docker:cluster": "pm2-runtime start pm2.config.js", "build:docker": "docker build . -t worker-service --label version=$BUDIBASE_RELEASE_VERSION", "dev:stack:init": "node ./scripts/dev/manage.js init", "dev:builder": "npm run dev:stack:init && nodemon", diff --git a/packages/worker/pm2.js b/packages/worker/pm2.config.js similarity index 75% rename from packages/worker/pm2.js rename to packages/worker/pm2.config.js index 33829f327c..b5fb1880ef 100644 --- a/packages/worker/pm2.js +++ b/packages/worker/pm2.config.js @@ -1,7 +1,7 @@ module.exports = { apps: [ { - script: "dist/index.js", + script: "./dist/index.js", instances: "max", exec_mode: "cluster", },