import secrets from pathlib import Path from typing import List from pydantic_settings import BaseSettings class Settings(BaseSettings): PROJECT_NAME: str = "Identity Service" API_V1_STR: str = "/api/v1" # SECURITY SECRET_KEY: str = secrets.token_urlsafe(32) ACCESS_TOKEN_EXPIRE_MINUTES: int = 30 # CORS BACKEND_CORS_ORIGINS: List[str] = ["*"] # Database DB_DIR: Path = Path("/app") / "storage" / "db" class Config: env_file = ".env" case_sensitive = True settings = Settings() # Create DB directory if it doesn't exist settings.DB_DIR.mkdir(parents=True, exist_ok=True)