docker
docker copied to clipboard
impossible to use piwik on swarm
Hi, i've tried several containers and configuration to be able to use piwik on a docker swarm. When i start the piwik container, i can reconfigure it's connection to mysql recovering all the data, but on a docker swarm could be possible that the container switch from a node to another, or it can loose the connection to the db for some time, and the result is that piwik restart on a new brand one container loosing the initial confuguration and stopping to work untill someone reconfigure it another time.
Could be possible to mount a persistent volume for it's configuration or something like that?
Yes, just mount your persistent volume to /var/www/html/config
. This should probably be documented...
@dottgonzo, indeed today the persistence of data is a problem with the official image. As @Silvenga says, some directories must persist but configuration is not enough. There is also customization of Piwik (misc), plugins, sessions, temporary directory. So i think we must persist all this data in a separate folder (/data for example). Check this out for more info about the process.
I myself tested swarm and kubernetes with my image in my company and it works without any problems. I intend to make these changes soon in the official image with some PRs.
It would be great if the compose file could be updated by Matomo to version 3 which would force the removal of 'volumes_from' and resolve this issue. The compose file remains on version 2. Version 3 has been out for some time now.
any news?