mirror of
https://github.com/clucraft/PriceGhost.git
synced 2026-04-26 01:06:23 +02:00
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>
31 lines
517 B
Docker
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;"]
|