From 6375e390af924649348832d30568e0948871e92b Mon Sep 17 00:00:00 2001 From: Emelia Smith Date: Fri, 18 Aug 2023 15:05:35 +0200 Subject: [PATCH] Fix: support both DATABASE_URL and DB_PASS (#26295) --- streaming/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/streaming/index.js b/streaming/index.js index 2112ca433..a241fa328 100644 --- a/streaming/index.js +++ b/streaming/index.js @@ -110,6 +110,11 @@ const pgConfigFromEnv = (env) => { if (env.DATABASE_URL) { baseConfig = dbUrlToConfig(env.DATABASE_URL); + + // Support overriding the database password in the connection URL + if (!baseConfig.password && env.DB_PASS) { + baseConfig.password = env.DB_PASS; + } } else { baseConfig = pgConfigs[environment];