| # Use Node.js LTS version | |
| FROM node:18-slim | |
| # Create app directory | |
| WORKDIR /usr/src/app | |
| # Install dependencies directly | |
| RUN npm init -y && \ | |
| npm install express body-parser nodemailer | |
| # Copy application code | |
| COPY recharge.js . | |
| # Expose the port the app runs on | |
| EXPOSE 3000 | |
| # Command to run the application | |
| CMD [ "node", "recharge.js" ] |