# Use an official lightweight Node.js runtime as the base image FROM node:20-slim # Set the working directory inside the container WORKDIR /app # Copy package configuration files first to leverage Docker's cache layer COPY package*.json ./ # Install production dependencies only RUN npm install --omit=dev # Copy the actual server source code COPY server.js ./ # Explicitly expose the Hugging Face application port EXPOSE 5000 # Start the Node.js reverse proxy CMD ["node", "server.js"]