feat: deployment support and production readiness

- Add deployment section to README (systemd, Docker, nginx reverse proxy)
- Add environment variable support to server.py (PORT, PGN_URL, CACHE_TTL)
- Update .gitignore for Python artifacts and lara-chess directory
- Improve board/navigation UX in app.js (userScrolledMoves tracking,
  updateClocks function, better game switching)
This commit is contained in:
2026-05-24 15:12:17 +02:00
parent 0d94cac60c
commit 2ad3dab7f8
4 changed files with 139 additions and 15 deletions

View File

@@ -14,11 +14,11 @@ import time
import json
from datetime import datetime
PGN_URL = "https://www.deutsche-schachjugend.de/2026/odjm-d/partien/gesamt-utf8.pgn"
PORT = 8111
PGN_URL = os.environ.get("PGN_URL", "https://www.deutsche-schachjugend.de/2026/odjm-d/partien/gesamt-utf8.pgn")
PORT = int(os.environ.get("PORT", 8111))
CACHE_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "cache")
CACHE_FILE = os.path.join(CACHE_DIR, "gesamt-utf8.pgn")
CACHE_TTL = 30 # Sekunden
CACHE_TTL = int(os.environ.get("CACHE_TTL", 30)) # Sekunden
os.makedirs(CACHE_DIR, exist_ok=True)