- frontend/Dockerfile: Node 20 Alpine image running npm run dev - docker-compose: frontend service with depends_on db/minio/backend, source mounted as volume, named volume for node_modules to avoid OS binary conflicts between host and container - vite.config.ts: make API proxy target configurable via API_PROXY_TARGET env var (defaults to localhost:8080 for local dev, set to http://backend:8080 inside Docker) - .env: update PORT_FRONTEND to 5173 (actual vite dev server port) Usage: docker compose up frontend # starts frontend + all dependencies docker compose up # starts everything Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
16 lines
359 B
Docker
16 lines
359 B
Docker
FROM node:20-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# Install dependencies as a separate layer so they are cached when only source changes
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
|
|
# Source is mounted at runtime via docker-compose volume
|
|
# This COPY is only used when building without a volume (e.g. production image)
|
|
COPY . .
|
|
|
|
EXPOSE 5173
|
|
|
|
CMD ["npm", "run", "dev"]
|