marp-share / Dockerfile
Nipun's picture
Deploy marp-share (M1–M5): realtime + persistence + HF auth + comments + export
43370b3 verified
Raw
History Blame Contribute Delete
890 Bytes
# marp-share — Hugging Face Docker Space
# Serves the built SPA + REST API + Yjs realtime on port 7860, and runs marp-cli
# (with headless Chromium) for PDF/PPTX export.
FROM node:22-slim
# Chromium + fonts for marp-cli PDF/PPTX export.
RUN apt-get update && apt-get install -y --no-install-recommends \
chromium fonts-liberation fonts-noto-color-emoji fonts-noto-cjk \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install dependencies first for better layer caching.
COPY package.json package-lock.json* ./
COPY client/package.json ./client/
COPY server/package.json ./server/
RUN npm install
# Copy source and build the client bundle.
COPY . .
RUN npm run build
# Persisted data lives in a git-backed HF Dataset (see storage.ts); local dir is fallback.
ENV PORT=7860 \
CHROME_PATH=/usr/bin/chromium \
CHROME_NO_SANDBOX=1
EXPOSE 7860
CMD ["npm", "run", "start"]