- GET /api/health prüft die Datenbankverbindung - SQLite im WAL-Modus unter /data/app.db - Auslieferung des gebauten Frontends mit SPA-Fallback - leere Basis-Migration, Tests mit pytest Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
22 lines
503 B
Python
22 lines
503 B
Python
from functools import lru_cache
|
|
from pathlib import Path
|
|
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
|
|
|
|
data_dir: Path = Path("/data")
|
|
static_dir: Path = Path("/app/static")
|
|
log_level: str = "info"
|
|
|
|
@property
|
|
def database_url(self) -> str:
|
|
return f"sqlite:///{self.data_dir / 'app.db'}"
|
|
|
|
|
|
@lru_cache
|
|
def get_settings() -> Settings:
|
|
return Settings()
|