docker icon indicating copy to clipboard operation
docker copied to clipboard

impossible to use piwik on swarm

Open dottgonzo opened this issue 6 years ago • 4 comments

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?

dottgonzo avatar Mar 18 '18 11:03 dottgonzo

Yes, just mount your persistent volume to /var/www/html/config. This should probably be documented...

Silvenga avatar Mar 18 '18 19:03 Silvenga

@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.

crazy-max avatar Mar 19 '18 20:03 crazy-max

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.

alphaDev23 avatar Apr 11 '18 18:04 alphaDev23

any news?

dottgonzo avatar Jan 15 '21 21:01 dottgonzo