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,