# Build stage FROM registry.itzana.me/docker-proxy/oven/bun:1.3.3 AS builder WORKDIR /app COPY package.json bun.lockb* ./ RUN bun install --frozen-lockfile COPY . . RUN bun run build # Release FROM registry.itzana.me/docker-proxy/nginx:alpine COPY --from=builder /app/build /usr/share/nginx/html # Add nginx configuration for SPA routing RUN echo 'server { \ listen 3000; \ location / { \ root /usr/share/nginx/html; \ index index.html; \ try_files $uri $uri/ /index.html; \ } \ }' > /etc/nginx/conf.d/default.conf EXPOSE 3000 CMD ["nginx", "-g", "daemon off;"]