FROM python:3.12-slim

WORKDIR /app

# Install djraphdb from the repo root (mounted as a volume in development,
# or copied in CI/production).  The COPY below brings in the library source
# at /djraphdb so that `pip install -e` works without network access.
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Install djraphdb itself from the project root (one directory up from this
# example).  In the docker-compose.yml the project root is bind-mounted at
# /djraphdb so changes are picked up live.
RUN pip install --no-cache-dir -e /djraphdb 2>/dev/null || true

COPY . .
