# Build stage - use Bun for fast dependency installation and build FROM oven/bun:latest AS builder WORKDIR /app # Copy package.json and bun.lockb (if available) COPY package.json bun.lockb* ./ # Install dependencies RUN bun install # Copy source code COPY . . # Build the app RUN bun run build # Production stage - use nginx for serving static files FROM nginx:alpine # Copy built assets from builder stage COPY --from=builder /app/dist /usr/share/nginx/html # Copy custom nginx config for SPA routing (optional but recommended) COPY nginx.conf /etc/nginx/conf.d/default.conf # Expose port 80 EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]