Update Dockerfile
Browse files- Dockerfile +5 -4
Dockerfile
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Set the working directory inside the container
|
| 2 |
WORKDIR /app
|
| 3 |
|
| 4 |
-
# Copy package.json and package-lock.json to the working directory
|
| 5 |
-
COPY package*.json ./
|
| 6 |
-
|
| 7 |
# Copy the entire project to the working directory
|
| 8 |
COPY . .
|
| 9 |
|
|
@@ -17,6 +17,7 @@ RUN npm install reactflow
|
|
| 17 |
|
| 18 |
RUN npm run build
|
| 19 |
|
|
|
|
| 20 |
# Use the official Nginx image as the base for serving the built files
|
| 21 |
FROM nginx:stable-alpine
|
| 22 |
|
|
@@ -37,4 +38,4 @@ EXPOSE 7860
|
|
| 37 |
USER nginx
|
| 38 |
|
| 39 |
# Start Nginx when the container launches
|
| 40 |
-
CMD ["nginx", "-g", "daemon off;"]
|
|
|
|
| 1 |
+
# Use the official Node.js image as the base
|
| 2 |
+
FROM node:18 AS build
|
| 3 |
+
|
| 4 |
# Set the working directory inside the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
|
|
|
|
|
|
|
|
|
| 7 |
# Copy the entire project to the working directory
|
| 8 |
COPY . .
|
| 9 |
|
|
|
|
| 17 |
|
| 18 |
RUN npm run build
|
| 19 |
|
| 20 |
+
|
| 21 |
# Use the official Nginx image as the base for serving the built files
|
| 22 |
FROM nginx:stable-alpine
|
| 23 |
|
|
|
|
| 38 |
USER nginx
|
| 39 |
|
| 40 |
# Start Nginx when the container launches
|
| 41 |
+
CMD ["nginx", "-g", "daemon off;"]
|