Update config.go to Support PostgresURL as ENV Var
This commit is contained in:
parent
64e5b1874b
commit
ff00fc5677
@ -857,7 +857,10 @@ func LoadConfig(file string) (*Config, error) {
|
||||
parsedConfig.Section("postgres").MapTo(&psql)
|
||||
if server.StoreBackend == "postgres" {
|
||||
if psql.URL == "" {
|
||||
return nil, ErrPostgresUnconfigured
|
||||
psql.URL = os.Getenv("DATABASE_URL")
|
||||
if psql.URL == "" {
|
||||
return nil, ErrPostgresUnconfigured
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user