Add check to fix startup if CLUSTER_MODE is enable
This commit is contained in:
parent
887383bdb6
commit
eb04c89182
|
@ -32,6 +32,7 @@ const environment = {
|
|||
REDIS_PASSWORD: process.env.REDIS_PASSWORD,
|
||||
REDIS_CLUSTERED: process.env.REDIS_CLUSTERED,
|
||||
HTTP_MIGRATIONS: process.env.HTTP_MIGRATIONS,
|
||||
CLUSTER_MODE: process.env.CLUSTER_MODE,
|
||||
API_REQ_LIMIT_PER_SEC: process.env.API_REQ_LIMIT_PER_SEC,
|
||||
GOOGLE_CLIENT_ID: process.env.GOOGLE_CLIENT_ID,
|
||||
GOOGLE_CLIENT_SECRET: process.env.GOOGLE_CLIENT_SECRET,
|
||||
|
|
|
@ -58,7 +58,7 @@ export async function startup(app?: any, server?: any) {
|
|||
return
|
||||
}
|
||||
STARTUP_RAN = true
|
||||
if (server) {
|
||||
if (server && env.CLUSTER_MODE?.toLowerCase() !== "true") {
|
||||
console.log(`Budibase running on ${JSON.stringify(server.address())}`)
|
||||
env._set("PORT", server.address().port)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue