Files
undercooked/Containerfile
T
ducoterra f84c6ebaef Scaffold project and author 14-phase roadmap
Browser co-op kitchen game: FastAPI + native WebSockets, server-authoritative
20 Hz simulation, in-memory anonymous lobbies, data-driven YAML levels, Canvas 2D
vanilla ES-module client with locally authored SVG art and no external CDNs.

.agents/PLAN.md records the LOCKED decisions; .agents/user_stories/ holds the 12
flow contracts; .agents/phases/todo/ breaks them into 14 sequential, test-gated
phases (71 task files), each leaving the app launchable and the suite green.

LLM-Generated: true
2026-10-05 17:05:56 -04:00

35 lines
1.1 KiB
Docker

# Multi-stage build for the Undercooked game server.
# Stage 1 resolves and installs dependencies; stage 2 is a slim runtime.
# No database stage: live game state is in-memory by design (see .agents/PLAN.md).
FROM docker.io/python:3.12-slim AS builder
ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_NO_CACHE_DIR=1
WORKDIR /build
COPY pyproject.toml README.md ./
COPY src ./src
RUN pip install --prefix=/install .
FROM docker.io/python:3.12-slim AS runtime
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
DEBUGPY=0 \
UNDERCOOKED_HOST=0.0.0.0 \
UNDERCOOKED_PORT=8000 \
UNDERCOOKED_LEVELS_DIR=/app/levels
WORKDIR /app
RUN useradd --create-home --uid 10001 player
COPY --from=builder /install /usr/local
COPY src ./src
COPY levels ./levels
COPY app ./app
COPY README.md ./
USER player
EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD python -c "import urllib.request,sys;sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8000/healthz',timeout=2).status==200 else 1)"
ENTRYPOINT ["python", "-m", "undercooked"]