Create Dockerfile
Browse files- Dockerfile +20 -0
Dockerfile
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use official Node.js image
|
2 |
+
FROM node:18
|
3 |
+
|
4 |
+
# Set working directory
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
# Copy package.json and install dependencies
|
8 |
+
RUN npm install express cors dotenv
|
9 |
+
|
10 |
+
# Copy the rest of the application
|
11 |
+
COPY . .
|
12 |
+
|
13 |
+
# Ensure amounts.json exists and set permissions
|
14 |
+
RUN touch amounts.json && chmod 666 amounts.json
|
15 |
+
|
16 |
+
# Expose the port
|
17 |
+
EXPOSE 7860
|
18 |
+
|
19 |
+
# Start the application
|
20 |
+
CMD ["node", "server.js"]
|