From 82ed2d2cb719f7061eb2e4cad3a9ee79e06344eb Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 12 Sep 2022 15:17:39 +0100 Subject: [PATCH] Prefer worker/app port to generic port env variable - #7736. --- packages/server/src/environment.js | 4 ++-- packages/worker/src/environment.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/server/src/environment.js b/packages/server/src/environment.js index 7f929f79e1..fe05a296e2 100644 --- a/packages/server/src/environment.js +++ b/packages/server/src/environment.js @@ -37,8 +37,8 @@ function parseIntSafe(number) { let inThread = false module.exports = { - // important - PORT: process.env.PORT || process.env.APP_PORT, + // important - prefer app port to generic port + PORT: process.env.APP_PORT || process.env.PORT, JWT_SECRET: process.env.JWT_SECRET, COUCH_DB_URL: process.env.COUCH_DB_URL, MINIO_URL: process.env.MINIO_URL, diff --git a/packages/worker/src/environment.ts b/packages/worker/src/environment.ts index fd6749a0f7..1e6d0da637 100644 --- a/packages/worker/src/environment.ts +++ b/packages/worker/src/environment.ts @@ -43,7 +43,8 @@ const env = { PLATFORM_URL: process.env.PLATFORM_URL, APPS_URL: process.env.APPS_URL, // ports - PORT: process.env.PORT || process.env.WORKER_PORT, + // prefer worker port to generic port + PORT: process.env.WORKER_PORT || process.env.PORT, CLUSTER_PORT: process.env.CLUSTER_PORT, // flags NODE_ENV: process.env.NODE_ENV,