Add support for setting POSTGRES_PORT (#333)

Co-authored-by: Martin Conraux <rhodes@protonmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
This commit is contained in:
Martin
2024-03-12 14:39:53 +01:00
committed by GitHub
parent c3f77eb713
commit 5ad33845c9
5 changed files with 7 additions and 1 deletions

View File

@@ -48,6 +48,7 @@ class Settings(BaseSettings):
PROJECT_NAME: str
SENTRY_DSN: HttpUrl | None = None
POSTGRES_SERVER: str
POSTGRES_PORT: int = 5432
POSTGRES_USER: str
POSTGRES_PASSWORD: str
POSTGRES_DB: str = ""
@@ -60,6 +61,7 @@ class Settings(BaseSettings):
username=self.POSTGRES_USER,
password=self.POSTGRES_PASSWORD,
host=self.POSTGRES_SERVER,
port=self.POSTGRES_PORT,
path=self.POSTGRES_DB,
)