Spaces:
Paused
Paused
Upload 2 files
#1
by mikmc5 - opened
- Dockerfile +13 -17
- app.js +0 -0
Dockerfile
CHANGED
|
@@ -1,23 +1,19 @@
|
|
| 1 |
-
|
| 2 |
-
FROM node:18-slim
|
| 3 |
|
| 4 |
-
|
| 5 |
-
WORKDIR /usr/src/app
|
| 6 |
|
| 7 |
-
# Copy the
|
| 8 |
-
COPY
|
| 9 |
|
| 10 |
-
#
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
# Copy the rest of the application code to the container
|
| 14 |
-
COPY . .
|
| 15 |
-
|
| 16 |
-
# Set environment variable to production
|
| 17 |
ENV NODE_ENV=production
|
| 18 |
|
| 19 |
-
#
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
-
#
|
| 23 |
-
CMD ["
|
|
|
|
| 1 |
+
FROM node:20-slim
|
|
|
|
| 2 |
|
| 3 |
+
WORKDIR /app
|
|
|
|
| 4 |
|
| 5 |
+
# Copy only the bundled application file
|
| 6 |
+
COPY app.js .
|
| 7 |
|
| 8 |
+
# Default environment variables
|
| 9 |
+
ENV PORT=7860
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
ENV NODE_ENV=production
|
| 11 |
|
| 12 |
+
# Make the application executable
|
| 13 |
+
RUN chmod +x app.js
|
| 14 |
+
|
| 15 |
+
# Expose the port that the application uses
|
| 16 |
+
EXPOSE 7860
|
| 17 |
|
| 18 |
+
# Start the application directly
|
| 19 |
+
CMD ["./app.js"]
|
app.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|