Files
motovaultpro/frontend/Dockerfile
Eric Gullickson 698db0ed4c Working React 19 before Compiler integration
🚀 Phase 2 Complete - React 19 Foundation
- React upgraded: 18.2.0 → 19.0.0 
- MUI upgraded: 5 → 6 
- React Router upgraded: 6 → 7 
- All packages updated and working 
- Production build: 995KB bundle 
- All containers working 

Ready for Phase 3: React Compiler integration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 16:46:31 -05:00

44 lines
966 B
Docker

# Production Dockerfile for MotoVaultPro Frontend
FROM node:20-alpine AS build
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install all dependencies (needed for build)
RUN npm install
# Copy source code
COPY . .
# Build the application
RUN npm run build
# Production stage with nginx
FROM nginx:alpine
# Copy built assets from build stage
COPY --from=build /app/dist /usr/share/nginx/html
# Copy nginx configuration
COPY nginx.conf /etc/nginx/nginx.conf
# Create non-root user for nginx (nginx group already exists)
RUN adduser -S frontend -u 1001 -G nginx
# Change ownership of nginx directories
RUN chown -R frontend:nginx /var/cache/nginx && \
chown -R frontend:nginx /var/log/nginx && \
chown -R frontend:nginx /etc/nginx/conf.d
RUN touch /var/run/nginx.pid && \
chown -R frontend:nginx /var/run/nginx.pid
USER frontend
# Expose ports
EXPOSE 3000 3443
# Start nginx
CMD ["nginx", "-g", "daemon off;"]