File size: 538 Bytes
6a71a12 1d0925c 6a71a12 f13b3dc 6a71a12 f13b3dc 8647fad 6a71a12 f13b3dc 6a71a12 8647fad 6a71a12 bd6c8b8 6a71a12 bd6c8b8 6a71a12 bd6c8b8 | 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 30 | FROM node:18-alpine
WORKDIR /app
# Copy dependency definitions
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy all files
COPY . .
# Build the Next.js app
RUN npm run build
# Copy standalone output
RUN cp -r .next/standalone ./standalone
RUN cp -r .next/static ./standalone/.next/static
RUN cp -r public ./standalone/public
# Expose port 7860 (Required for Hugging Face Spaces)
EXPOSE 7860
ENV PORT=7860
# Switch to standalone directory
WORKDIR /app/standalone
# Start the application
CMD ["node", "server.js"] |