updates on the design

This commit is contained in:
2026-07-29 18:44:19 +05:30
parent 7d672139b5
commit c17057f693
5 changed files with 162 additions and 137 deletions

33
Dockerfile Normal file
View File

@@ -0,0 +1,33 @@
# Stage 1: Build the React application
FROM node:20-alpine AS build
WORKDIR /app
# Copy package management files first for better caching
COPY package.json yarn.lock* package-lock.json* ./
# Install dependencies (using npm to respect package-lock.json if it exists, with legacy-peer-deps for compatibility)
RUN npm install --legacy-peer-deps
# Copy the source code
COPY . .
# Build the application
RUN npm run build
# Stage 2: Serve the application with Nginx
FROM nginx:alpine
WORKDIR /usr/share/nginx/html
# Remove default Nginx welcome page
RUN rm -rf ./*
# Copy built assets from the previous stage
COPY --from=build /app/build/ .
# Copy the custom Nginx configuration
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]