Add backend and frontend skeleton
This commit is contained in:
23
app/backend/core/config.py
Normal file
23
app/backend/core/config.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""Environment configuration derived from environment variables."""
|
||||
|
||||
from functools import lru_cache
|
||||
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
"""Application settings."""
|
||||
|
||||
service_name: str = "backend"
|
||||
environment: str = "development"
|
||||
database_url: str = (
|
||||
"postgresql+psycopg://postgres:postgres@postgres:5432/avaaz"
|
||||
)
|
||||
|
||||
model_config = SettingsConfigDict(env_prefix="", case_sensitive=False)
|
||||
|
||||
|
||||
@lru_cache(maxsize=1)
|
||||
def get_settings() -> Settings:
|
||||
"""Return cached settings instance."""
|
||||
return Settings()
|
||||
Reference in New Issue
Block a user