# Multi-stage build for production deployment FROM node:18-alpine AS builder # Set working directory WORKDIR /app # Clone the repository RUN apk add --no-cache git RUN git clone https://git.raphaelforment.fr/BuboBubo/cosmique.git . # Install dependencies RUN npm ci --only=production=false # Build the application RUN npm run build # Production stage FROM nginx:alpine AS production # Copy built files to nginx COPY --from=builder /app/dist /usr/share/nginx/html # Copy custom nginx configuration COPY nginx.conf /etc/nginx/nginx.conf # Expose port 80 EXPOSE 80 # Start nginx CMD ["nginx", "-g", "daemon off;"]