diff --git a/api/Dockerfile b/api/Dockerfile index 239b614..7a0ac92 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -2,14 +2,15 @@ FROM python:3.12-slim AS base WORKDIR /app RUN pip install uv -FROM base AS development -# python:3.12-slim has no bare 'python' binary; without this uv invalidates the baked venv on every start -RUN ln -sf /usr/local/bin/python3 /usr/local/bin/python +FROM python:3.12-slim AS development +WORKDIR /app COPY pyproject.toml . COPY src/ src/ -RUN uv sync -COPY . . -CMD ["uv", "run", "uvicorn", "rehearsalhub.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"] +# Install directly into system Python — no venv, so uvicorn's multiprocessing.spawn +# subprocess inherits the same interpreter and can always find rehearsalhub +RUN pip install --no-cache-dir -e "." +# ./api/src is mounted as a volume at runtime; the editable .pth file points here +CMD ["python3", "-m", "uvicorn", "rehearsalhub.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"] FROM base AS lint COPY pyproject.toml .