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.
To run Towwwer, you need:
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.
PAGESPEED_INSIGHTS_API_KEY
environment variable.SLACK_WEBHOOK_URL
environment variable.rel/config/runtime_config.exs
.rel/config/runtime_config.exs
.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
You can run migrations in production with ./bin/towwwer migrate
. This is handled by rel/commands/migrate.sh
and Towwwer.ReleaseTasks
.
The following are run in CI, and should always pass:
mix format --check-formatted
mix test
mix dialyzer
mix credo
To start your Phoenix server:
mix deps.get
mix ecto.setup
cd assets && npm install
mix phx.server
Now you can visit localhost:4000
from your browser.
Towwwer is licensed under the MIT License.