kirche-einfach/backend/app/settings.py

34 lines
1.2 KiB
Python

from pathlib import Path
from pydantic_settings import BaseSettings, SettingsConfigDict
# Repo-root .env (shared with the compose stack). Real environment variables
# always take precedence over .env values.
REPO_ROOT = Path(__file__).resolve().parent.parent.parent
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=REPO_ROOT / ".env", extra="ignore")
version: str = "0.1.0"
debug: bool = False
# App database (SQLite file). Override via DATABASE_URL for other engines.
database_url: str = str(REPO_ROOT / "backend" / "data" / "kirche.db")
# Canonical flow definitions (source of truth): one Langflow export per file.
flows_dir: str = str(REPO_ROOT / "backend" / "flows")
# Auto-reconcile backend/flows into the DB + LFX while the API is running.
flows_watch_enabled: bool = True
langflow_url: str = "http://localhost:7860"
langflow_api_key: str = ""
lfx_url: str = "http://localhost:6004"
lfx_api_key: str = ""
llm_api_key: str = ""
# Base URL flows use for callbacks into this API. Must be reachable
# FROM the LFX process (compose: http://app:8000).
callback_base_url: str = "http://localhost:8000"
settings = Settings()