Skip to content
This repository was archived by the owner on Aug 3, 2022. It is now read-only.

Commit c189fcb

Browse files
author
Grant Kinney
committed
Adds README
1 parent 6dc73bd commit c189fcb

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Piwik on Dokku
2+
3+
## Installation
4+
5+
1. Create a new app with dokku.
6+
2. Connect a mysql database to the app.
7+
3. Add dokku config settings for the database connection: `DB_NAME`, `DB_HOST`, `DB_PORT` `DB_USERNAME`, and `DB_PASSWORD`.
8+
4. Add dokku config settings for `SALT` and `TRUSTED_HOST` (the domain name you access the piwik app from)
9+
5. Deploy repo to dokku
10+
11+
## Config
12+
13+
Dokku's filesystem is ephemeral and will be wiped out on each deploy. Any settings that piwik automatically updates in `vendor/piwik/piwik/config/config.ini.php` need to be manually duplicated in the `config.ini.php` in the repo, or they will be wiped out the next time the app is rebuilt.
14+
15+
## Plugins
16+
17+
Plugins are managed by composer. Plugins installed through piwik's web interface will get erased when the app is rebuilt.
18+
19+
Most piwik plugins do not include a composer.json file so you'll need to use the package option and define the settings for each plugin manually. See the configuration for the SecurityInfo plugin in `composer.json` for an example. By sure that `"type": "piwik-plugin"` is defined in the plugins package.json file.
20+
21+
1. `composer require [plugin]` to install the plugin
22+
2. Add plugin to `Plugins[]` and `PluginsInstalled[]` lists in `config.ini.php` so that the plugin is activated when the app is re-deployed.
23+
24+
## GeoIP
25+
26+
This setup is configured to use the [GeoIP2 Plugin](https://github.com/diabl0/piwik-geoip2). The GeoLite databases are provided by a custom buildpack https://github.com/danstiner/heroku-buildpack-geoip-geolite2.git defined in `.buildpacks`.
27+
28+
You can turn on this geolocation method on in Settings > System > Geolocation. Rebuilding the app will get a fresh copy of the GeoLite databases.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "creativecoder/piwik-analytics",
2+
"name": "creativecoder/dokku-piwik",
33
"type": "project",
44
"repositories": [
55
{

0 commit comments

Comments
 (0)