@@ -11,3 +11,28 @@ We see your [Matomo](https://matomo.org) (jap. “honesty”) and raise you our
Obakasan is a very simple web analytics tool, designed to work together with WordPress websites and the [WP-PostViews](https://wordpress.org/plugins/wp-postviews/) plugin.
Given at least read-only database access, it regularly extracts the post views data from the database, so that statistics can be built with it.
## How to deploy
Without Docker, it works basically like this:
1. Clone this repository on a server with access to the WordPress database
2. Create a venv (or something like this) and install the requirements (`pip install -r requirements.txt`)
3. Set the environment variables `DB_HOST`, `DB_USER`, `DB_PASSWORD` and `DB_NAME`
4. Launch `./obakasan.py` and keep it running in the background
Now, every day at midnight (00:00 UTC), a JSON file will be created containing the actual stats for every post, page and attachement as calculated by WP-PostViews.
With Docker, add the following service to your Docker Compose file you already have for the website: