v_1.7
This commit is contained in:
+40
@@ -0,0 +1,40 @@
|
||||
# QR Presentation — self-contained image (Node + LibreOffice + ffmpeg)
|
||||
FROM node:20-bookworm-slim
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# LibreOffice handles Office/OpenDocument -> PDF; ffmpeg normalises video;
|
||||
# fonts make converted decks render correctly.
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libreoffice-impress \
|
||||
libreoffice-writer \
|
||||
libreoffice-calc \
|
||||
ffmpeg \
|
||||
curl ca-certificates \
|
||||
fonts-liberation fonts-dejavu-core fonts-noto-core \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN npm install --omit=dev --no-audit --no-fund
|
||||
|
||||
COPY . .
|
||||
|
||||
# Vendor PDF.js so the viewer works even on an offline / air-gapped network.
|
||||
RUN mkdir -p public/vendor/pdfjs \
|
||||
&& curl -fsSL https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js -o public/vendor/pdfjs/pdf.min.js \
|
||||
&& curl -fsSL https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.worker.min.js -o public/vendor/pdfjs/pdf.worker.min.js
|
||||
|
||||
ENV NODE_ENV=production \
|
||||
DATA_DIR=/data \
|
||||
HOME=/tmp \
|
||||
PORT=3000
|
||||
|
||||
# LibreOffice needs a writable home for its profile.
|
||||
RUN mkdir -p /data && chown -R node:node /data /tmp
|
||||
USER node
|
||||
|
||||
VOLUME ["/data"]
|
||||
EXPOSE 3000
|
||||
CMD ["node", "server/index.js"]
|
||||
Reference in New Issue
Block a user