29 lines
623 B
Python
29 lines
623 B
Python
from functools import lru_cache
|
|
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
|
|
|
|
database_url: str
|
|
|
|
minio_endpoint: str
|
|
minio_access_key: str
|
|
minio_secret_key: str
|
|
minio_bucket: str
|
|
minio_use_ssl: bool = False
|
|
minio_public_url: str
|
|
|
|
jwt_secret_key: str
|
|
jwt_algorithm: str = "HS256"
|
|
jwt_expire_minutes: int = 600
|
|
|
|
public_base_url: str
|
|
allowed_origins: list[str] = ["http://localhost:5173"]
|
|
|
|
|
|
@lru_cache
|
|
def get_settings() -> Settings:
|
|
return Settings()
|