fix: correct how Dockerfile copies dirs

This commit is contained in:
2025-07-24 17:24:00 +00:00
parent 3eb1522525
commit 1fe672d293
3 changed files with 25 additions and 15 deletions

View File

@@ -1,8 +1,14 @@
FROM node:20-alpine AS builder
# --- Build React app ---
FROM node:22-alpine AS builder
WORKDIR /app
COPY . .
RUN npm install && npm run build
COPY frontend/package*.json ./
RUN npm install
COPY frontend/ ./
RUN npm run build
# --- Serve with Nginx ---
FROM nginx:alpine
COPY --from=builder /app/build /usr/share/nginx/html