Puppeteer is an external web service that can be used to generate PDFs from Notebooks created with LabKey ELN. To use this service, you need to obtain the puppeteer premium module for your LabKey Service, deploy the puppeteer-service in a docker container elsewhere, and configure your LabKey Server to communicate with it.
The puppeteer-service is a standalone docker container web service that allows for generation of assets (e.g. PDFs, screenshots) via Puppeteer. Learn about deploying this service below. Note that the puppeteer-service can be stood up once and shared by several LabKey Server instances (e.g. staging, production, etc.).
The puppeteer module is part of LabKey Server that communicates with this service to generate PDFs from Notebooks. It is run in the remote service mode to communicate with the service using the remote URL where it is deployed.
The puppeteer-service can be deployed in a Docker container on either a Linux or OSX host. Docker is required to be installed on the host machine. Retrieve the latest Docker image from Docker Hub using the following command:
docker pull labkeyteamcity/lk-puppeteer-service
This image can then be run in a container:
docker run -i --init --rm --cap-add=SYS_ADMIN -p 3031:3031 --name puppeteer-service labkeyteamcity/lk-puppeteer-service
To run the container so that it is persistent (i.e. so that it will survive server instance restarts), use the following:
sudo docker run -di --init --cap-add=SYS_ADMIN -p--restart unless-stopped --name puppeteer-service labkeyteamcity/lk-puppeteer-service
A simple HTML view has been added to allow for interacting with the service. To see this view navigate to http://localhost:3031 to get familiar.
Docker Port The Docker Port property specifies what host port the service container should be bound to.
The Remote URL where the web service can be found should be provided to whomever will now configure LabKey Server to connect to the puppeteer-service.
The version of Puppeteer is shown in the lower panel for your reference.
puppeteer.enabled;startup=true
puppeteer.mode;startup=remote
puppeteer.docker.port;startup=3031
puppeteer.docker.remapLocalhost;startup=true
puppeteer.remote.url;startup=http://localhost:3031