File size: 440 Bytes
3652c72 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# Use Node.js 18 as base image
FROM node:18-alpine
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci --only=production
# Copy source code
COPY . .
# Build the application
RUN npm run build
# Expose required port (Hugging Face requirement)
EXPOSE 7860
# Set environment variables
ENV PORT=7860
ENV HOSTNAME=0.0.0.0
# Start command with correct port
CMD ["npm", "start"] |