Spaces:
Sleeping
Sleeping
File size: 976 Bytes
3bf6388 |
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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# -------- BUILDER STAGE --------
FROM node:20-bullseye AS build
# Install git + dependencies
RUN apt-get update && apt-get install -y git git-lfs \
chromium \
libatk-bridge2.0-0 \
libatk1.0-0 \
libatspi2.0-0 \
libcups2 \
libdrm-dev \
libgbm-dev \
libxkbcommon-x11-0 \
libgtk-3-0 \
libnss3 \
libxss1 \
fonts-liberation \
libasound2 && \
git-lfs install
# Clone your repo
WORKDIR /app
RUN git clone https://github.com/Zerotracex-Stuff/presenton.git . --depth=1
# Install dependencies
WORKDIR /app/servers/nextjs
RUN npm install
# Create dummy font (optional — avoids build error)
RUN mkdir -p public/fonts && \
touch public/fonts/Inter.ttf
# Build Next.js
RUN npm run build
# -------- RUNTIME STAGE --------
FROM node:20-bullseye
WORKDIR /app
COPY --from=build /app /app
# Expose Hugging Face Space port
ENV PORT=7860
EXPOSE 7860
WORKDIR /app/servers/nextjs
CMD ["npm", "run", "start", "--", "-p", "7860"]
|