feat: add backend for multiplayer support

This commit is contained in:
2025-07-29 01:32:02 -04:00
parent 3f1fe2c693
commit 8ea2d591a0
32 changed files with 300 additions and 3 deletions

27
frontend/Dockerfile Normal file
View File

@@ -0,0 +1,27 @@
FROM python:3.12-slim
# Install build dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Set working directory
WORKDIR /app
# Copy project files
COPY . .
# Install PyYAML and websockets into __pypackages__/3.12/lib
RUN mkdir -p __pypackages__/3.12/lib && \
PYTHONPATH=__pypackages__/3.12/lib \
pip install --no-cache-dir --target=__pypackages__/3.12/lib \
PyYAML==6.0.2 websockets==15.0.1
# Build the web version
RUN pygbag --build main.py
# Expose the desired port
EXPOSE 3010
# Serve the build output
WORKDIR /app/build/web
CMD ["python", "-m", "http.server", "3010"]