Files
rehearshalhub/api/Dockerfile
Mistral Vibe 261942be03 Fix dev compose: API PYTHONPATH and web volume permissions
API: bake ENV PYTHONPATH=/app/src into the development Dockerfile stage
so it's available to uvicorn's WatchFiles reloader subprocess — relying
on compose env vars isn't reliable across process forks.

Web: replace ./web:/app bind mount (caused EACCES in Podman rootless due
to UID mismatch) with ./web/src:/app/src — this preserves the container's
package.json and node_modules while still giving Vite live access to
source files for HMR.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 19:02:36 +02:00

24 lines
636 B
Docker

FROM python:3.12-slim AS base
WORKDIR /app
RUN pip install uv
FROM base AS development
ENV PYTHONPATH=/app/src
COPY pyproject.toml .
RUN uv sync
COPY . .
CMD ["uv", "run", "uvicorn", "rehearsalhub.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
FROM base AS lint
COPY pyproject.toml .
RUN uv sync --frozen
COPY src/ src/
RUN uv run ruff check src/ && uv run mypy src/
FROM base AS production
COPY pyproject.toml .
RUN uv sync --no-dev --frozen || uv sync --no-dev
COPY . .
ENTRYPOINT ["sh", "entrypoint.sh"]
CMD ["uv", "run", "uvicorn", "rehearsalhub.main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "2"]