Klaxon enables reporters and editors to monitor scores of sites on the web for newsworthy changes.
To deploy klaxon using this repo you'll need docker and docker-compose.
This method uses Gmail as email notification server, so you'll also need a gmail account. If you have your own SMTP server you can just replace the server details in the .env file and that should work as well.
-
create an application password for the gmail account that will act as notifier
- go to https://myaccount.google.com/apppasswords
- add a new application and save the generated password (16 characters)
-
edit
.envand provide values for the following varsSECRET_KEY_BASE- add a randomly generated passwordPOSTGRES_PASS- add a randomly generated passwordGMAIL_USERNAME- the email address which acts as sender/notifier (see step 1.)GMAIL_PASSWORD- the password generated at step 1. (but dont forget to delete any white spaces)
-
create the folder for database persistence with
mkdir pgdataand fetch the klaxon source code withgit submodule update --init -
start the stack using
docker-compose upin a separate terminal- the klaxon container will be built on the first run
- when it's done, you should be able to access its web interface at http://localhost:3000
-
find out klaxon's container name using
docker ps; should be something likeklaxon-deploy_klaxon_1 -
in a new terminal access the klaxon container using
docker exec -it <container-name> bash -
add an admin user using the command
bundle exec rake users:create_admin RAILS_ENV=production ADMIN_EMAILS=<your_admin_email> -
go to the web UI, enter the admin email and check your inbox for the login link; you should now have access to the administration dashboard
-
finally, add a cron job that will trigger the checks at specific intervals eg.
crontab -e
# perform checks every 10 minutes
*/10 * * * * docker exec <klaxon-container> bundle exec rake check:all💜