Spaces:
Sleeping
Sleeping
File size: 573 Bytes
0e13326 | 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 31 32 | FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# ---- Runtime ----
FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
# HF Spaces requires port 7860
ENV PORT=7860
ENV HOSTNAME=0.0.0.0
# Copy standalone build
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public
# Bundle the extracted benchmarks so the Space works out of the box
COPY --from=builder /app/data ./data
EXPOSE 7860
CMD ["node", "server.js"]
|