Spaces:
Paused
Paused
File size: 598 Bytes
748342b | 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 28 29 | # Use a base image that makes it easy to install multiple tools
FROM node:20-slim
# 1. Install Python (and pip if needed)
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
# 2. Set working directory
WORKDIR /app
# 3. Copy dependencies first (caching)
COPY package.json package-lock.json* ./
RUN npm install
# 4. Copy the rest of the app
COPY . .
# 5. Build the Next.js app
RUN npm run build
# 6. Expose the port (HF Spaces uses 7860)
EXPOSE 7860
ENV PORT=7860
ENV HOSTNAME="0.0.0.0"
# 7. Run the Next.js server
CMD ["npm", "start"] |