diff --git a/api/Dockerfile b/api/Dockerfile index 511b80d..2eb31a7 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -3,11 +3,13 @@ WORKDIR /app RUN pip install uv FROM base AS development -ENV PYTHONPATH=/app/src +# 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 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"] +CMD ["uv", "run", "uvicorn", "rehearsalhub.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload", "--reload-dir", "/app/src"] FROM base AS lint COPY pyproject.toml . diff --git a/web/Dockerfile b/web/Dockerfile index ad6d332..2be93a1 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -2,7 +2,8 @@ FROM node:20-alpine AS development WORKDIR /app COPY package*.json ./ RUN npm install --legacy-peer-deps -# Source is mounted as a volume at runtime — node_modules stays in the image +COPY . . +# ./web/src is mounted as a volume at runtime for HMR; everything else comes from the image CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"] FROM node:20-alpine AS builder