groupe-meditation/backend/app/core/config.py

29 lines
903 B
Python

"""Configuration de l'application."""
from pathlib import Path
from pydantic_settings import BaseSettings
from typing import List
_ENV_FILE = Path(__file__).resolve().parent.parent.parent / ".env"
class Settings(BaseSettings):
DATABASE_URL: str = "postgresql+asyncpg://grpmed:grpmed2026@127.0.0.1:5432/groupe_meditation"
JWT_SECRET: str = "changez-moi-en-production-clef-secrete-64-caracteres-minimum"
JWT_ALGORITHM: str = "HS256"
JWT_EXPIRE_DAYS: int = 30
CORS_ORIGINS: List[str] = [
"http://localhost:5173",
"http://localhost:3000",
"https://app.87-16.org",
]
INVITATION_EXPIRE_HOURS: int = 48
VAPID_PUBLIC_KEY: str | None = None
VAPID_PRIVATE_KEY_B64: str | None = None
VAPID_SUBJECT: str = "mailto:admin@app.87-16.org"
class Config:
env_file = str(_ENV_FILE)
env_file_encoding = "utf-8"
settings = Settings()