P42 Dashboard: erster Stand
FastAPI-Backend und React-Frontend mit Konten, Sendungsverfolgung, Projekt-Artikeln, Vorrat & Einkauf mit Rezeptabgleich, Reise-Weltkarte, Kanban-Projekten mit Priorität, Server-Monitoring und den Designs Matrix und Blackwall. Betrieb per Docker hinter nginx (siehe DEPLOY.md). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
dd58b3d1f8
75 files changed
+11418
No files matched your search
@@ -0,0 +1,24 @@
|
||||
"""Lädt config.json (oder config.example.json) aus dem Projektordner."""
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
DATA_DIR = Path(os.environ.get("P42_DATA_DIR") or ROOT / "data")
|
||||
FRONTEND_DIST = ROOT / "frontend" / "dist"
|
||||
|
||||
|
||||
def _load() -> dict:
|
||||
path = ROOT / "config.json"
|
||||
if not path.exists():
|
||||
path = ROOT / "config.example.json"
|
||||
return json.loads(path.read_text(encoding="utf-8"))
|
||||
|
||||
|
||||
config = _load()
|
||||
|
||||
PORT = int(config.get("port", 3000))
|
||||
LINKS = config.get("links", {})
|
||||
TRACKING = config.get("tracking", {})
|
||||
# Wikimedia verlangt eine Kontaktangabe im User-Agent; leer = keine Wikipedia-Texte
|
||||
WIKIPEDIA_CONTACT = (config.get("reisen") or {}).get("wikipediaKontakt", "").strip()
|
||||
Reference in new issue
Block a user