Collect Google's PageSpeed Insights and graph over time.
- Sign up for a Pagespeed Insights API Key
- Edit the values in
helm/values.yaml
andhelm upgrade --install pagespeedinsights-collector ./helm/
- or use
--set
to override the default valueshelm upgrade --install --set APIKey=<yourPageSpeedInsightsAPIKey>,PAGES="https://www.example.com/" pagespeedinsights-collector ./helm/
- From your local machine:
cp .env.example .env
using your API key and list of pages to track.npm install
npm run dev:local
- Open http://localhost:3000/metrics in your browser
- Via docker:
cp .env.example .env
using your API key and list of pages to track.docker-compose up
- Available services:
- if you make changes to
package.json
orpackage-lock.json
pleaserm -Rf ./node_modules/
in order for it to be re-installed from within the container - To check for smells using a local installation of sonarcube
docker run -d --name sonarqube -e SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true -p 9000:9000 sonarqube:8.6.1-community
to start the local server, set your env vars withSONAR_HOST_URL=http://localhost:9000 SONAR_LOGIN="YOUR_TOKEN_HERE" npm run test:sonar
. If you want to stop the local instance of sonarqube rundocker stop sonarqube
You might need to install trivy
for the security related tests.
npm test
js unit tests and Dockerfile lintingnpm run test:dockerfile:security
runs security best practice static analysis on the Dockerfile (not on CI currently)
- Direct access to the K8s service:
kubectl port-forward deployment/pagespeedinsights-collector 3000:3000