basic loader
هذا الالتزام موجود في:
23
Dockerfile
23
Dockerfile
@@ -1,11 +1,20 @@
|
||||
FROM node:20-alpine AS build
|
||||
# Use the latest LTS version of Node.js
|
||||
FROM node:18-alpine
|
||||
|
||||
# Set the working directory inside the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package.json and package-lock.json
|
||||
COPY package*.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install
|
||||
|
||||
# Copy the rest of your application files
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:alpine
|
||||
COPY --from=build /app/build /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
# Expose the port your app runs on
|
||||
EXPOSE 3000
|
||||
|
||||
# Define the command to run your app
|
||||
CMD ["npm", "start"]
|
||||
المرجع في مشكلة جديدة
حظر مستخدم