mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-07 10:15:03 -04:00
change: rename POSTGRES_URL to POSTGRES_URL_OVERRIDE / no longer changes value
This commit is contained in:
parent
ecf80b8e9c
commit
6c7cb7e795
@ -39,16 +39,16 @@ class PostgresProvider(AbstractDBProvider, BaseSettings):
|
||||
POSTGRES_SERVER: str = "postgres"
|
||||
POSTGRES_PORT: str = "5432"
|
||||
POSTGRES_DB: str = "mealie"
|
||||
POSTGRES_URL: str = ""
|
||||
POSTGRES_URL_OVERRIDE: str | None = None
|
||||
|
||||
model_config = SettingsConfigDict(arbitrary_types_allowed=True, extra="allow")
|
||||
|
||||
@property
|
||||
def db_url(self) -> str:
|
||||
if self.POSTGRES_URL:
|
||||
return self.POSTGRES_URL
|
||||
if self.POSTGRES_URL_OVERRIDE:
|
||||
return self.POSTGRES_URL_OVERRIDE
|
||||
|
||||
self.POSTGRES_URL = str(
|
||||
return str(
|
||||
PostgresDsn.build(
|
||||
scheme="postgresql",
|
||||
username=self.POSTGRES_USER,
|
||||
@ -58,8 +58,6 @@ class PostgresProvider(AbstractDBProvider, BaseSettings):
|
||||
)
|
||||
)
|
||||
|
||||
return self.POSTGRES_URL
|
||||
|
||||
@property
|
||||
def db_url_public(self) -> str:
|
||||
user = self.POSTGRES_USER
|
||||
|
Loading…
x
Reference in New Issue
Block a user