FROM python:3.12-slim

WORKDIR /app

# Install the package with the raster (Pillow) and demo (FastAPI/uvicorn) extras.
COPY pyproject.toml README.md ./
COPY src ./src
RUN pip install --no-cache-dir ".[raster,demo]"

# The demo app lives outside the package; copy it in and run from /app so the
# `examples.fastapi_app` module is importable.
COPY examples ./examples

EXPOSE 2200
CMD ["uvicorn", "examples.fastapi_app:app", "--host", "0.0.0.0", "--port", "2200"]
