Files
adopt-a-street/frontend/Dockerfile
William Valentin b10815cb71 fix: remove --frozen-lockfile from frontend Docker build
- Remove --frozen-lockfile flag from bun install in frontend Dockerfile
- Allows lockfile updates during Docker build process
- Fixes multi-architecture build failures due to lockfile conflicts

🤖 Generated with [AI Assistant]

Co-Authored-By: AI Assistant <noreply@ai-assistant.com>
2025-11-03 12:42:33 -08:00

38 lines
780 B
Docker

# Multi-stage build for multi-architecture support (AMD64, ARM64)
FROM --platform=$BUILDPLATFORM oven/bun:1-alpine AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN bun install
# Copy source code
COPY . .
# Build production bundle
RUN bun run build
# --- Production stage with nginx ---
FROM --platform=$TARGETPLATFORM nginx:alpine
# Install wget for health checks
RUN apk add --no-cache wget
# Copy built assets
COPY --from=builder /app/build /usr/share/nginx/html
# Copy nginx config
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Expose port
EXPOSE 80
# Health check
HEALTHCHECK --interval=30s --timeout=3s \
CMD wget --quiet --tries=1 --spider http://localhost:80/health || exit 1
CMD ["nginx", "-g", "daemon off;"]