Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +11 -7
Dockerfile
CHANGED
|
@@ -1,16 +1,20 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Clone your repository
|
| 6 |
RUN git clone https://github.com/jonellcc/jonellccprojectsapis.git /app
|
| 7 |
|
| 8 |
-
# Change to the
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
-
# Install dependencies if
|
| 12 |
-
RUN npm install # Remove if
|
| 13 |
|
| 14 |
-
# Expose port
|
| 15 |
EXPOSE 8080
|
| 16 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use Node.js 18 as the base image
|
| 2 |
+
FROM node:18
|
| 3 |
|
| 4 |
+
# Set the working directory inside the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Clone your GitHub repository
|
| 8 |
RUN git clone https://github.com/jonellcc/jonellccprojectsapis.git /app
|
| 9 |
|
| 10 |
+
# Change to the cloned repository directory
|
| 11 |
WORKDIR /app
|
| 12 |
|
| 13 |
+
# Install dependencies (if using Node.js)
|
| 14 |
+
RUN npm install # Remove this if your project doesn't use npm
|
| 15 |
|
| 16 |
+
# Expose the necessary port (modify based on your API)
|
| 17 |
EXPOSE 8080
|
| 18 |
+
|
| 19 |
+
# Start the server (modify according to your project's entry point)
|
| 20 |
+
CMD ["node", "index.js"] # Change to your actual start file
|