maintained by wagnerpinheiro
This Dockerfile (available as wagnerpinheiro/piwik) gives you a completly secure piwik.
It's based on the centos:7 Image
Piwik Database Settings
- PIWIK_MYSQL_USER
- default: piwik
- PIWIK_MYSQL_PASSWORD
- default: piwik
- PIWIK_MYSQL_HOST
- default: mysql
- PIWIK_MYSQL_PORT
- default: 3306 - if you use a different mysql port change it
- PIWIK_MYSQL_DBNAME
- default: piwik - don't use the symbol - in there!
- PIWIK_MYSQL_PREFIX
- default: piwik_
Piwik Admin Settings
- PIWIK_ADMIN
- default: admin - the name of the admin user
- PIWIK_ADMIN_PASSWORD
- default: [randomly generated 10 characters] - the password for the admin user
- PIWIK_ADMIN_MAIL
- default: [email protected] - only needed if you are interested in one of those newsletters
- PIWIK_SUBSCRIBE_NEWSLETTER
- 1 or 0 - default: 0
- PIWIK_SUBSCRIBE_PRO_NEWSLETTER
- 1 or 0 - default: 0
Website to Track Settings
- SITE_NAME
- default: My local Website
- SITE_URL
- default: http://localhost
- SITE_TIMEZONE
- default: America/Sao_Paulo
- SITE_ECOMMERCE
- 1 or 0 - default: 0
Piwik Track Settings
- ANONYMISE_IP
- 1 or 0 - this will anonymise IPs - default: 1
- DO_NOT_TRACK
- 1 or 0 - this will skip browsers with do not track enabled from tracking - default: 1
- PIWIK_RELATIVE_URL_ROOT
- default: /piwik/ - you can chance that to whatever you want/need
First you need a running MySQL Container.
docker run -d -e MYSQL_ROOT_PASSWORD=piwik -e MYSQL_USER=piwik -e MYSQL_PASSWORD=piwik -e MYSQL_DATABASE=piwik --name piwikdb mysql
You need to --link your mysql container to wagnerpinheiro/piwik with the name mysql
docker run -d -p 80:80 --link piwikdb:mysql --name piwik wagnerpinheiro/piwik