Jotzy/frontend/Dockerfile
2026-01-06 13:13:59 +00:00

17 lines
470 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ---------- Builder ----------
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci # install deps (no devdependencies unless you need them)
COPY . .
RUN npm run build # Vite creates ./dist
# ---------- Runtime ----------
FROM nginx:stable-alpine AS runtime
# Copy the compiled assets from the builder stage
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]