This commit is contained in:
team3
2026-09-07 17:38:17 +02:00
parent 6478559252
commit 2a9ab4c7da
11 changed files with 521 additions and 125 deletions

24
Dockerfile Normal file
View File

@@ -0,0 +1,24 @@
FROM python:3.12-slim
WORKDIR /app
COPY server/requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Godot legt `make godot` in den Build-Kontext. Damit passt die Version auf
# dem Server exakt zu der, mit der das Spiel entwickelt wurde.
COPY dist/godot /usr/local/bin/godot
COPY project.godot ./spiel/
COPY scenes ./spiel/scenes
COPY scripts ./spiel/scripts
COPY server/matchmaker.py ./
# Einmal beim Bauen importieren, sonst tut das der erste Raum - und der
# Spieler wartet.
RUN godot --headless --path /app/spiel --import
ENV GODOT=/usr/local/bin/godot
ENV SPIEL_PFAD=/app/spiel
EXPOSE 8000
CMD ["uvicorn", "matchmaker:app", "--host", "0.0.0.0", "--port", "8000"]