23 lines
568 B
Python
23 lines
568 B
Python
|
|
from pathlib import Path
|
||
|
|
from pydantic_settings import BaseSettings
|
||
|
|
|
||
|
|
|
||
|
|
class Settings(BaseSettings):
|
||
|
|
storage_path: str = str(Path(__file__).parent / "storage")
|
||
|
|
database_url: str = "sqlite:///./droplake.db"
|
||
|
|
|
||
|
|
# 6 GB hard limit — frontend warns at 1 GB
|
||
|
|
max_upload_bytes: int = 6 * 1024 * 1024 * 1024
|
||
|
|
|
||
|
|
# Brute-force protection
|
||
|
|
max_failed_attempts: int = 10
|
||
|
|
lockout_minutes: int = 15
|
||
|
|
|
||
|
|
# Background cleanup
|
||
|
|
cleanup_interval_minutes: int = 30
|
||
|
|
|
||
|
|
model_config = {"env_file": ".env", "env_file_encoding": "utf-8"}
|
||
|
|
|
||
|
|
|
||
|
|
settings = Settings()
|