oettaM123's picture
Room Lookup: server-side Colyseus join via Node sidecar
07a7591
Raw History Blame Contribute Delete
693 Bytes
FROM python:3.11-slim
WORKDIR /app
# Node.js runtime for the Colyseus room-lookup sidecar (schema-state decoding that
# the Python client cannot do). Debian bookworm ships Node 18 + npm, which is fine
# for colyseus.js 0.15 and ws 8.
RUN apt-get update \
&& apt-get install -y --no-install-recommends nodejs npm \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# Install the room-lookup sidecar's Node dependencies at build time.
RUN cd room_lookup && npm install --omit=dev --no-audit --no-fund
ENV PORT=7860
EXPOSE 7860
CMD ["sh", "-c", "exec uvicorn app:app --host 0.0.0.0 --port ${PORT:-7860}"]