montera34 / pageonex

PageOneX. Analyzing front pages
http://pageonex.com
GNU Affero General Public License v3.0
54 stars 13 forks source link

read Piwik config from env-vars #227

Closed rahulbot closed 5 years ago

rahulbot commented 5 years ago

This PR moves the Piwik site id and host url to be read from environments variables. If those are wont set, it uses the defaults that were previously in this piwik.yml file already.

We need to do this to support using Piwik inside of the container, where we can't edit the .yml file and don't want to hard-code configuration.

This solves #225. @numeroteca please let me know if there is a id number I should put on dev that is different than the one that is on production (to facilitate easy testing of the integration between the app and Piwik).

rahulbot commented 5 years ago

Oh - I deployed this to http://dev.pageonex.com and I do see the Piwik tracking code being injected into the HTML.

numeroteca commented 5 years ago

This a great solution for containers.

Let's use the same id in production and dev. In fact, maybe we don't need stats for the dev version. Thanks!