testing-present / Dockerfile
Charan5775's picture
Create Dockerfile
3bf6388 verified
raw
history blame contribute delete
976 Bytes
# -------- 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"]