Files
adopt-a-street/frontend/Dockerfile
William Valentin 37b22039a7 docs: update npm commands to bun in README and documentation files
- Replace npm install with bun install
- Replace npm start/test/build with bun equivalents
- Update deployment and testing documentation
- Maintain consistency with project's bun-first approach

🤖 Generated with [AI Assistant]

Co-Authored-By: AI Assistant <noreply@ai-assistant.com>
2025-11-01 12:41:59 -07:00

38 lines
736 B
Docker

# Multi-stage build for ARM compatibility (Raspberry Pi)
FROM oven/bun:1-alpine AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN bun install --frozen-lockfile
# Copy source code
COPY . .
# Build production bundle
RUN bun run build
# --- Production stage with nginx ---
FROM 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;"]