| # Use a stable Node LTS base | |
| FROM node:18-alpine | |
| # Create app directory | |
| WORKDIR /app | |
| ENV NODE_ENV=production | |
| ENV PORT=7860 | |
| # Install dependencies | |
| COPY package.json package-lock.json* ./ | |
| RUN npm ci --production | |
| # Copy app source | |
| COPY . . | |
| # Expose the port (container runtime will forward it) | |
| EXPOSE 7860 | |
| # Ensure your server reads process.env.PORT (see instructions below) | |
| CMD ["npm", "start"] |