# Build context is the repo root (see docker-compose.yml) so this can grab the root main.py /
# requirements.txt the same way Wasmer's python preset does, plus the backend/ package itself.
FROM python:3.12-slim

WORKDIR /app

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt gunicorn

COPY main.py .
COPY backend/ ./backend

ENV PYTHONUNBUFFERED=1
EXPOSE 8000

CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:8000", "main:app"]
