EBOOKS / Dockerfile
Yogesh
Deploy backend Express server
0757e01
raw
history blame contribute delete
423 Bytes
# Use official Node.js lightweight image
FROM node:20-slim
# Set working directory inside the container
WORKDIR /app
# Copy package configurations
COPY package*.json ./
# Install production dependencies
RUN npm ci --only=production
# Copy all server code
COPY . .
# Hugging Face Spaces requires exposing and running on port 7860
ENV PORT=7860
EXPOSE 7860
# Command to run our backend server
CMD ["node", "server.js"]