# Build context is the repository root so the demo runs against the
# grelmicro source in this checkout (not a published release).
# Pinned by digest for reproducible builds. Dependabot bumps the digest.
FROM python:3.14-slim@sha256:cad9a2c871761c413caa6fdd6441c783451e740a48aaeba60ae62a8b53525ef6

WORKDIR /srv
RUN pip install --no-cache-dir uv==0.11.29

# Install grelmicro (current source) plus the demo's runtime deps.
COPY pyproject.toml README.md ./
COPY grelmicro ./grelmicro
RUN uv pip install --system --no-cache \
    ".[redis,postgres,standard]" \
    "fastapi==0.139.0" "uvicorn[standard]==0.51.0" "typer==0.24.1"

COPY examples/fastapi-demo/app.py ./app.py

EXPOSE 8000
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "2"]
