Spaces:
Running
Running
Deploy: Configure system chromium for Hugging Face container environment
Browse filesFiles changed (3)
- CICD.md+2
- Dockerfile+3-1
- index.js+1
89 unmodified lines90919289 unmodified lines- `index.js` — Express server, Puppeteer job queue, two routes: `/api/export-pdf` (HTML) and `/api/generate-from-json` (JSON→HTML)- `templateRenderer.js` — Server-side HTML renderers for Jake and Corporate templates- `Dockerfile` — Chromium deps + UID 1000 setup89 unmodified lines909192939489 unmodified lines- `index.js` — Express server, Puppeteer job queue, two routes: `/api/export-pdf` (HTML) and `/api/generate-from-json` (JSON→HTML)- `templateRenderer.js` — Server-side HTML renderers for Jake and Corporate templates- `Dockerfile` — Chromium deps + UID 1000 setupat last use @deploy.bat to deploy.
3 unmodified lines45678936 unmodified lines464748495051523 unmodified lines# Install system dependencies for Puppeteer/Chromium# We install the necessities and let Puppeteer download its own ChromiumRUN apt-get update && apt-get install -y \ca-certificates \fonts-liberation \libasound2 \36 unmodified linesUSER nodeENV HOME=/home/node \PATH=/home/node/.local/bin:$PATH \PUPPETEER_CACHE_DIR=/home/node/.cache/puppeteerWORKDIR /app3 unmodified lines4567891036 unmodified lines47484950515253543 unmodified lines# Install system dependencies for Puppeteer/Chromium# We install the necessities and let Puppeteer download its own ChromiumRUN apt-get update && apt-get install -y \chromium \ca-certificates \fonts-liberation \libasound2 \36 unmodified linesUSER nodeENV HOME=/home/node \PATH=/home/node/.local/bin:$PATH \PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromiumWORKDIR /app
39 unmodified lines40414243444539 unmodified linesconsole.log('Launching new browser instance...');browser = await puppeteer.launch({headless: 'new',args: ['--no-sandbox','--disable-setuid-sandbox',39 unmodified lines4041424344454639 unmodified linesconsole.log('Launching new browser instance...');browser = await puppeteer.launch({headless: 'new',executablePath: process.env.PUPPETEER_EXECUTABLE_PATH || undefined,args: ['--no-sandbox','--disable-setuid-sandbox',
CICD.md+2
Dockerfile+3-1
index.js+1