Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ RUN npm ci --production
FROM alpine:latest
RUN apk add --no-cache nodejs npm chromium
COPY --from=build /app .
# Set environment variables for Chromium to avoid issues with Puppeteer
# See: https://github.com/puppeteer/puppeteer/issues/11023#issuecomment-1776247197
ENV XDG_CONFIG_HOME=/tmp/.chromium
ENV XDG_CACHE_HOME=/tmp/.chromium
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- `--influxpassword`: InfluxV1 specific. Sets the InfluxDB password. Usage: `--influxpassword=YOUR_PASSWORD`
- `--influxdatabase`: InfluxV1 specific. Sets the InfluxDB database. Usage: `--influxdatabase=YOUR_DATABASE`
- `--configFile`: Specifies a custom Lighthouse configuration file. Usage: `--configFile=path/to/config.json`

- `--includetimestamp`: Adds timestamp to report file names. By default is false. Usage: `--includetimestamp=true`
---

### Custom configuration file:
Expand Down Expand Up @@ -58,10 +58,18 @@ npm install
npx mocha --timeout 10000 .\test\huge.test.steps.js --browsertype=desktop --headless=false --url="https://demoqa.com/"
```

**With docker**
**With docker (from root user)**
1. git clone https://github.com/iBombit/lighthouse_custom
2. Verify that headless mode is enabled via "--headless=true" flag
3. In repo dir run this command:
```
docker run --rm -v "$PWD:$PWD" -w "$PWD" ibombit/lighthouse-puppeteer-chrome:12.7.1-alpine npx mocha --timeout 10000 .\test\huge.test.steps.js --browsertype=desktop --headless=true --url="https://demoqa.com/"
```

**With docker (from current user)**
1. git clone https://github.com/iBombit/lighthouse_custom
2. Verify that headless mode is enabled via "--headless=true" flag
3. In repo dir run this command:
```
docker run --rm -v "$PWD:$PWD" -w "$PWD" --user "$(id -u):$(id -g)" ibombit/lighthouse-puppeteer-chrome:12.7.1-alpine npx mocha --timeout 10000 .\test\huge.test.steps.js --browsertype=desktop --headless=true --url="https://demoqa.com/"
```
4 changes: 4 additions & 0 deletions docker/v12.7.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ RUN npm ci --production
FROM alpine:latest
RUN apk add --no-cache nodejs npm chromium
COPY --from=build /app .
# Set environment variables for Chromium to avoid issues with Puppeteer
# See: https://github.com/puppeteer/puppeteer/issues/11023#issuecomment-1776247197
ENV XDG_CONFIG_HOME=/tmp/.chromium
ENV XDG_CACHE_HOME=/tmp/.chromium