update Dockerfile

هذا الالتزام موجود في:
2025-10-29 14:57:57 +03:00
الأصل e58032f141
التزام 39f346ecc8

عرض الملف

@@ -1,29 +1,11 @@
# Stage 1: Build the React application
FROM node:18-alpine AS builder
FROM node:20-alpine AS build
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci
# Copy all files
RUN npm install
COPY . .
# Build the application
RUN npm run build
# Stage 2: Serve with Nginx
FROM nginx:alpine
# Copy the built React app to Nginx's html directory
COPY --from=builder /app/dist /usr/share/nginx/html
# Expose port 80
COPY --from=build /app/build /usr/share/nginx/html
EXPOSE 80
# Start Nginx
CMD ["nginx", "-g", "daemon off;"]