PriceGhost/frontend/Dockerfile
clucraft 8992087220 Fix Dockerfiles: use npm install instead of npm ci
npm ci requires package-lock.json which wasn't generated.
Using npm install instead for builds.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 14:02:06 -05:00

31 lines
517 B
Docker

# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy source code
COPY . .
# Build the application
RUN npm run build
# Production stage - serve with nginx
FROM nginx:alpine AS production
# Copy built files to nginx
COPY --from=builder /app/dist /usr/share/nginx/html
# Copy nginx configuration
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Expose port
EXPOSE 80
# Start nginx
CMD ["nginx", "-g", "daemon off;"]