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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user