mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-21 14:23:04 +00:00
Fix: support both DATABASE_URL and DB_PASS (#26295)
This commit is contained in:
parent
bb51c0676d
commit
6375e390af
|
@ -110,6 +110,11 @@ const pgConfigFromEnv = (env) => {
|
||||||
|
|
||||||
if (env.DATABASE_URL) {
|
if (env.DATABASE_URL) {
|
||||||
baseConfig = dbUrlToConfig(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 {
|
} else {
|
||||||
baseConfig = pgConfigs[environment];
|
baseConfig = pgConfigs[environment];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue