# Frontend-only (IndexedDB) Dockerfile FROM node:18-alpine AS builder WORKDIR /app # Clone the repository RUN apk add --no-cache git RUN git clone https://git.raphaelforment.fr/BuboBubo/palace.git . # Install dependencies RUN npm install # Build the frontend RUN npm run build # Production stage FROM nginx:alpine # Copy built files COPY --from=builder /app/dist /usr/share/nginx/html # Copy nginx config for SPA RUN echo 'server { \ listen 80; \ server_name _; \ location / { \ root /usr/share/nginx/html; \ index index.html; \ try_files $uri $uri/ /index.html; \ } \ }' > /etc/nginx/conf.d/default.conf EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]