From 9e20764526b83e7bb760eafd21f37477c5b8e69c Mon Sep 17 00:00:00 2001 From: Firq Date: Fri, 29 Dec 2023 13:12:36 +0100 Subject: [PATCH] Updated README --- README.md | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 313b5e2..cec2def 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,30 @@ -# Docker image to run lighthouse, but without non-privileged user +# unlighthouse Docker Image -Uses the full node:20-bookwork image instead of slim due to issues with GitLab lighthouse Docker \ No newline at end of file +Image based on `node:20.10.0-bookworm` with `chromium` and `unlighthouse` preinstalled. + +It can be used for benchmarking a given site with lighthouse and to generate corresponding reports with ease. + +## Usage + +The unlighthouse cli can be used by running the command `unlighthouse` inside the container + +```shell +unlighthouse-ci --site "https://preview.firq.dev/" +``` + +It is recommended to provide a `unlighthouse.config.ts` to reduce the amount of CLI arguments needed. + +An example config can be found here: + +```typescript +export default { + puppeteerOptions: { + args: ["--no-sandbox", "--disable-setuid-sandbox"], + }, + ci: { + budget: 90, + buildStatic: true + }, + outputPath: "unlighthouse-reports", +} +```