Sign inSign up

eeacms/garie-lighthouse

By eeacms

•Updated 3 months ago

Image
0

8.3K

eeacms/garie-lighthouse repository overview

reports

Tool to gather lighthouse metrics and supports CRON jobs.

Highlights

  • Poll for lighthouse performance metrics on any website and stores the data into InfluxDB
  • Understand your performance metrics with recommend improvements thanks to lighthouse reports
  • View all historic lighthouse reports.
  • Setup within minutes

⁠Overview of garie-lighthouse

Garie-lighthouse was developed as a plugin for the Garie⁠ Architecture.

Garie⁠ is an out the box web performance toolkit, and garie-lighthouse is a plugin that generates and stores lighthouse data into InfluxDB.

Garie-lighthouse can also be run outside the Garie environment and run as standalone.

If your interested in an out the box solution that supports multiple performance tools like lighthouse, google-speed-insight and web-page-test then checkout Garie⁠.

If you want to run garie-lighthouse standalone you can find out how below.

⁠Getting Started

⁠Prerequisites
  • Docker installed
⁠Running garie-lighthouse

You can get setup with the basics in a few minutes.

First clone the repo.

git clone https://github.com/eea/garie-lighthouse.git

Next setup you're config. Edit the config.json and add websites to the list.

{
  "plugins":{
        "lighthouse":{
            "cron": "0 */4 * * *"
        }
    },
  "urls": [
    {
      "url": "https://www.eea.europa.eu/"
    },
    {
      "url": "https://biodiversity.europa.eu/"
    }
  ]
}

Once you finished edited your config, lets build our docker image and setup our environment.

docker build -t garie-lighthouse . && docker-compose up

This will build your copy of garie-lighthouse and run the application.

On start garie-lighthouse will start to gather performance metrics for the websites added to the config.json.

⁠Data collected

Lighthouse comes with loads of audits out the box. You can view all metrics in the reports.

Garie-lighthouse filters what data is stored into influxDB.

PropertyTypeDescription
performance-scorenumberOverall performance score.
pwa-scorenumberOverall progressive web app score.
accessibility-scorenumberOverall accessibility score.
best-practices-scorenumberOverall best practices score.
seo-scorenumberOverall seo score.
time-to-first-bytenumberNumber of ms to first byte.
firstContentfulPaintnumberNumber of ms to first contentful paint.
firstMeaningfulPaintnumberNumber of ms to first meaningful paint.
interactivenumberNumber of ms to interactive.
firstCPUIdlenumberNumber of ms to CPU idle.
speedIndexnumberGoogle speed index.
estimatedInputLatencynumberInput Latency.
errors-in-consolenumberNumber of errors in the console.
redirectsnumberNumber of redirects.
redirectsnumberNumber of redirects.

⁠config.json

PropertyTypeDescription
plugins.lighthouse.cronstring (optional)Cron timer. Supports syntax can be found [here].(https://www.npmjs.com/package/cron⁠)
plugins.lighthouse.retryobject (optional)Configuration how to retry the failed tasks
plugins.lighthouse.retry.afternumber (optional, default 30)Minutes before we retry to execute the tasks
plugins.lighthouse.retry.timesnumber (optional, default 3)How many time to retry to execute the failed tasks
plugins.lighthouse.retry.timeRangenumber (optional, default 360)Period in minutes to be checked in influx, to know if a task failed
plugins.lighthouse.max_age_of_report_filesnumber (optional, default 365)Maximum age (in days) for all the files. Any older file will be deleted.
plugins.lighthouse.delete_files_by_typeobject (optional, no default)Configuration for deletion of custom files. (e.g. mp4 files)
plugins.lighthouse.delete_files_by_type.typestring (required for 'delete_files_by_type')The type / extension of the files we want to delete. (e.g. "mp4").
plugins.lighthouse.delete_files_by_type.agenumber (required for 'delete_files_by_type')Maximum age (in days) of the custom files. Any older file will be deleted.
urlsobject (required)Config for lighthouse. More detail below

urls object

PropertyTypeDescription
urlstring (required)Url to get lighthouse metrics for.

For more information please go to the garie-plugin⁠ repo.

Tag summary

Content type

Image

Digest

sha256:15a39f85a…

Size

828.9 MB

Last updated

3 months ago

docker pull eeacms/garie-lighthouse