Giter Club home page Giter Club logo

piwik-heroku's Introduction

Matomo (aka Piwik) on Heroku, Dokku, or Flynn

Even though the application has been renamed from Piwik to Matomo, the most of the composer packages are still namespaced using piwik. This is being updated for Matomo 4 (matomo-org/matomo#12519).

Installation

  1. Create a new app.
  2. Connect a mysql database to the app.
  3. Update config for database connection in config.ini.php as needed
  4. Add config settings for SALT and TRUSTED_HOST (the domain name you access the Matomo app from)
  5. Deploy app

Config

The filesystem is ephemeral and will be wiped out on each deploy. Any settings that Matomo 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.

Plugins

Plugins are managed by composer. Plugins installed through Matomo's web interface will get erased when the app is rebuilt.

Most Matomo 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.

  1. composer require [plugin] to install the plugin
  2. Add plugin to Plugins[] and PluginsInstalled[] lists in config.ini.php so that the plugin is activated when the app is re-deployed.

GeoIP

This setup is configured to use the GeoIp2 plugin included in the core Matomo package. The GeoLite databases are downloaded using a custom buildpack https://github.com/danstiner/heroku-buildpack-geoip-geolite2 defined in .buildpacks.

You can turn on this geolocation method on in Settings > System > Geolocation. Rebuilding the app will get a fresh copy of the GeoLite databases. You can also configure the plugin to download an updated database periodically.

Heroku

Heroku no longer uses the .buildpacks file, so you will need to specify buildpacks using the heroku cli.

Install the cli if needed, then run the following to specify the buildpacks for your app:

heroku buildpacks:add --index 1 https://github.com/danstiner/heroku-buildpack-geoip-geolite2
heroku buildpacks:add --index 2 heroku/php

piwik-heroku's People

Contributors

creativecoder avatar renovate[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.