FROM node:22-alpine WORKDIR /app # Copy package files first for better Docker layer caching COPY package.json ./ # Install dependencies RUN npm install --production # Copy application files COPY app.js ./ COPY views/ ./views/ # Expose port EXPOSE 3001 # Start the application CMD ["node", "app.js"]