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

27 lines
778 B
Python
Raw Normal View History

2026-03-04 14:01:00 -05:00
"""Configuration de l'application."""
2026-04-17 04:04:04 -04:00
from pathlib import Path
2026-03-04 14:01:00 -05:00
from pydantic_settings import BaseSettings
from typing import List
2026-04-17 04:04:04 -04:00
_ENV_FILE = Path(__file__).resolve().parent.parent.parent / ".env"
2026-03-04 14:01:00 -05:00
class Settings(BaseSettings):
2026-04-17 04:04:04 -04:00
DATABASE_URL: str = "postgresql+asyncpg://grpmed:grpmed2026@127.0.0.1:5432/groupe_meditation"
2026-03-04 14:01:00 -05:00
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",
2026-04-17 04:04:04 -04:00
"https://groupe-meditation.87-16.org",
2026-03-04 14:01:00 -05:00
]
INVITATION_EXPIRE_HOURS: int = 48
class Config:
2026-04-17 04:04:04 -04:00
env_file = str(_ENV_FILE)
2026-03-04 14:01:00 -05:00
env_file_encoding = "utf-8"
settings = Settings()