MVP Build

This commit is contained in:
Eric Gullickson
2025-08-09 12:47:15 -05:00
parent 2e8816df7f
commit 8f5117a4e2
92 changed files with 5910 additions and 0 deletions

45
frontend/Dockerfile Normal file
View File

@@ -0,0 +1,45 @@
# Production Dockerfile for MotoVaultPro Frontend
FROM node:20-alpine as build
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install production dependencies
RUN npm ci --only=production
# 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
RUN addgroup -g 1001 -S nginx && \
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 port
EXPOSE 3000
# Start nginx
CMD ["nginx", "-g", "daemon off;"]