gearheads
/
mastodon
Archived
2
0
Fork 0

Fix: support both DATABASE_URL and DB_PASS (#26295)

gh/dev
Emelia Smith 2023-08-18 15:05:35 +02:00 committed by GitHub
parent bb51c0676d
commit 6375e390af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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];