Create Dockerfile
Browse files- Dockerfile +18 -0
Dockerfile
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use Node.js LTS version
|
2 |
+
FROM node:18-slim
|
3 |
+
|
4 |
+
# Create app directory
|
5 |
+
WORKDIR /usr/src/app
|
6 |
+
|
7 |
+
# Install dependencies directly
|
8 |
+
RUN npm init -y && \
|
9 |
+
npm install express body-parser nodemailer
|
10 |
+
|
11 |
+
# Copy application code
|
12 |
+
COPY recharge.js .
|
13 |
+
|
14 |
+
# Expose the port the app runs on
|
15 |
+
EXPOSE 3000
|
16 |
+
|
17 |
+
# Command to run the application
|
18 |
+
CMD [ "node", "recharge.js" ]
|