25 lines
693 B
Docker
25 lines
693 B
Docker
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"]
|