Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +20 -3
Dockerfile
CHANGED
|
@@ -1,6 +1,23 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
|
|
|
| 5 |
RUN npm install
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the official Node.js 16 image as a parent image
|
| 2 |
+
FROM node:16
|
| 3 |
|
| 4 |
+
# Set the working directory in the container
|
| 5 |
+
WORKDIR /usr/src/app
|
| 6 |
+
|
| 7 |
+
# Copy the package.json and package-lock.json (if available)
|
| 8 |
+
COPY package*.json ./
|
| 9 |
|
| 10 |
+
# Install any dependencies
|
| 11 |
RUN npm install
|
| 12 |
+
|
| 13 |
+
# Copy the rest of your application's code
|
| 14 |
+
COPY . .
|
| 15 |
+
|
| 16 |
+
# Make sure the public directory exists (if your app depends on it)
|
| 17 |
+
RUN mkdir -p ./public
|
| 18 |
+
|
| 19 |
+
# Your application's default port, expose it if necessary
|
| 20 |
+
EXPOSE 7860
|
| 21 |
+
|
| 22 |
+
# Command to run your app
|
| 23 |
+
CMD ["node", "index.mjs"]
|