Fix dev container startup for both API and web

API:
- Add python symlink (python3-slim has no bare 'python') so uv doesn't
  invalidate the baked venv on every container start
- Copy src/ before uv sync so hatchling installs rehearsalhub as a
  proper editable install (.pth pointing to /app/src) — previously
  sync ran with no source present, producing a broken empty wheel
- Remove ENV PYTHONPATH workaround (no longer needed with correct install)
- Add --reload-dir /app/src to scope uvicorn's file watcher to the
  mounted source directory

Web:
- Add COPY . . after npm install so index.html and vite.config.ts are
  baked into the image — without them Vite ignored port config and fell
  back to 5173 with no entry point

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Mistral Vibe
2026-04-06 19:14:21 +02:00
parent 261942be03
commit a8cbd333d2
2 changed files with 6 additions and 3 deletions

View File

@@ -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