FROM python:3.12-slim

WORKDIR /app

# Use uv for fast installs. Single layer so changes to source don't bust the dep cache.
COPY pyproject.toml ./
RUN pip install --no-cache-dir uv && uv pip install --system --no-cache .

COPY . .

ENV PORT=8000
EXPOSE 8000

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
