update docker files

This commit is contained in:
2025-11-23 18:00:22 +03:00
parent e3e95628dc
commit b9c5ab69e6
4 changed files with 107 additions and 10 deletions

33
Dockerfile.prod Normal file
View File

@@ -0,0 +1,33 @@
# Multi-stage build for production
# Stage 1: Build the React application
FROM node:20-alpine AS build
# Set working directory
WORKDIR /app
# Copy package files
COPY package.json yarn.lock ./
# Install dependencies
RUN yarn install --frozen-lockfile
# Copy source code
COPY . .
# Build the application for production
RUN yarn build
# Stage 2: Serve with nginx
FROM nginx:alpine
# Copy custom nginx configuration
COPY nginx.conf /etc/nginx/nginx.conf
# Copy built application from build stage
COPY --from=build /app/build /usr/share/nginx/html
# Expose port 80
EXPOSE 80
# Start nginx
CMD ["nginx", "-g", "daemon off;"]