Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 3.01 KB

README.md

File metadata and controls

43 lines (29 loc) · 3.01 KB

Capture

A simple service for capturing rendered Web pages using puppeteer.

Ased as a companion service for data-fair.

Developper

To run locally you will need to install google-chrome-unstable for your system.

Install dependencies without downloading chromium:

export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
npm i

Then start the server:

npm run dev

Or build and run the docker image:

docker buildx build -t capture --progress plain --load . && docker run --rm -it --security-opt seccomp=$(pwd)/seccomp.json -p 5607:5607 -p 9090:9090 -e DEBUG=capture,timer -e ONLY_SAME_HOST=false -e PORT=5607 --name capture capture

Check the service with these examples:

Security

Consider reading this article https://github.com/Zenika/alpine-chrome#3-ways-to-securely-use-chrome-headless-with-this-image

We recommend using ./seccomp.json. If you trust all pages opened by capture you can use PUPPETEER_ARGS=["--no-sandbox"] environment variable.