# Use Node.js LTS version FROM node:20-alpine # Set working directory WORKDIR /app # Copy package.json and package-lock.json first for caching COPY package*.json ./ # Install dependencies RUN npm install --production # Copy the rest of your code COPY . . # Set environment variable for port (Railway will provide it) ENV PORT=5000 # Expose port (Railway uses the container's port) EXPOSE 5000 # Command to run your app CMD ["node", "index.js"]