juhalehtonen / towwwer

Continuous, automated website performance monitoring
MIT License
1 stars 0 forks source link
automation monitoring pagespeed-insights-api performance-monitoring seo

Towwwer

CircleCI

Towwwer is a tool for monitoring, collecting and presenting website performance data collected from Google PageSpeed Insights API.

Additionally, Towwwer can run WPScan against the monitored websites and keep track of which security issues are found. WPScan is a separate project, and their license details differ from those of Towwwer.

Lastly, Towwwer can be configured to send messages to a Slack channel via Slack webhooks whenever a significance difference in Lighthouse scores is detected between two consecutive measurements.

Requirements

To run Towwwer, you need:

Configuration

While the PageSpeed Insights API can be used without an API key, you will want to use one for anything more than a single Site + Monitor combination.

Development configuration

Production configuration

Deployment

Towwwer uses Distillery to build releases for production. See the Distillery docs for more details.

Steps taken to produce a new deployment:

# To build the Docker image
docker build -t elixir-ubuntu:latest .

# To build the release
docker run -v $(pwd):/opt/build --rm -it elixir-ubuntu:latest /opt/build/bin/build

After which you should see your release tarball in rel/artifacts.

If you add dependencies that require system packages, you will need to update the Dockerfile for the build container, and rerun the docker build command to update it.

Test local deployment: cp rel/artifacts/towwwer-0.1.0.tar.gz /tmp/test/

Start the release with: cd /tmp/test && tar -xf towwwer-0.1.0.tar.gz && ./bin/towwwer start

Production migrations

You can run migrations in production with ./bin/towwwer migrate. This is handled by rel/commands/migrate.sh and Towwwer.ReleaseTasks.

Features

Testing

The following are run in CI, and should always pass:

mix format --check-formatted
mix test
mix dialyzer
mix credo

Local Phoenix

To start your Phoenix server:

Now you can visit localhost:4000 from your browser.

License

Towwwer is licensed under the MIT License.