| FROM node:23 | |
| WORKDIR /app | |
| # Install PM2 globally for process management | |
| RUN npm install -g pm2 | |
| COPY package*.json ./ | |
| RUN npm install | |
| COPY . . | |
| # Expose the main port | |
| EXPOSE 7860 | |
| # Start the application using PM2 to ensure 24/7 operation | |
| CMD ["pm2-runtime", "start", "server.js"] |