-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
question: an alternative strategy how to use the matomo docker image #272
Comments
Thanks, that sounds like a much more sane way to run Matomo in docker. |
Absolutely what I experienced. I deploy Matomo in a Kubernetes cluster. And made persistent volume claims for all the folders you mentioned. |
@nflow Can you tell me which files Matomo makes changes to in the |
I use the IP2LOCATION plugin. This tells me to put the binary database into the "misc" folder. So I need to persist this folder. Otherwise the database is gone after a Redeploy. |
@hoermannklaus See https://github.com/matomo-org/docker/blob/master/Dockerfile-debian.template#L99 and combine that piece of information with https://hub.docker.com/_/matomo: The app matomo itself is not well structured. On the one hand you need |
This solution would work, weren't it for the anonymous docker volume that gets created automatically (due to the "VOLUME /var/www/html" instruction in the Matomo Dockerfile. Or aren't you guys using the official image? |
When you specify a mounted volume in the compose file (or even on the cli for that matter) with the same target inside the container it overrides the |
But isn't mounting /var/ww/html precisely what we want to avoid? And instead just mount the config, plugins and misc subdirectories? Thanks! |
Ah, yeah of course you're right. |
In addition to what is mentioned above, at the very least the Matomo built-in GeoIP2 plugin stores its files there and the custom logo upload feature also puts the images into misc/ |
We're using bitnami's matomo docker image (https://hub.docker.com/r/bitnami/matomo) and we can only suggest you to use it, too. All you need to do here is specify |
@tuky, I actually looked into the bitnami container the other day. What are your thoughts on that? |
We actually acknowledge that as a blackbox, just like matomo's code is a blackbox to us. But we trust in bitnami's competency and looking at the scripts their setup seems well structured. They have a large community and because it's open source we can still dive in, if something breaks. They made rootless work but we use it as root user, because that also runs cron inside the container to periodically run the archiver. It was surprisingly easy to set up a running service using AWS ECS and an EFS for volume persistence. |
I also think the bitnami approach seems to add much complexity which you need to understand, and I don't really get the benefits. I like containers to be as simple as possible. The official matomo image works almost perfectly in our swarm mode setup. (Although we needed to increase PHP's memory limit and max execution time, so we derived an image from the official one using a very short dockerfile). For running, we just assign volumes for the Updating matomo then is as simple as running the update in the web interface and then restarting the containers / services with the updated docker image according to the new version. |
Btw in the end I found https://github.com/crazy-max/docker-matomo works much better. |
Duplicate of #248 and matomo-org/matomo#19151. Unfortunately Matomo does not provide a cli to update the application. Just replacing the files may result in a broken database schema. |
It would be really useful if, in addition to closing issues and explaining what doesn't work, you could explain what does work? There's a lot of comments from people on one way or another to do this, and I'm personally left not really understanding how to upgrade Matomo at all. |
#248 (comment) is the only supported update mechanism by Matomo. |
This does not make sense, what does " But again, this does not make sense, it says it will download new files which we dont need because I already updated the image. Will there be an official document explaining how to update a Matomo app running on containers? Also we must consider automation/scripting ways of doing it, there is no way I will be clicking on some button to update tens of environments lol |
@adelca see my explanation in #375 (comment). |
hey, i have a question regarding an alternative strategy how to use the matomo docker image.
as far as i have observed it, the matomo applicaiton is copied by the
entryscript.sh
, if thematomo.php
is not present, to the/var/www/html
folder. since matomo performs various changes to the applicaiton during runtime, e.g. plugins, misc and config. the application folder is mounted externally, to not lose our configuration. the problem with that behavior is that updating a docker image will have no effect on deployments. thats my assessment so far.in order image updates affect the applicaiton itself i did a few changes. i decided to mount only:
each time i recreate the container all applications will be overwritten with the originals and the update of an image will affect the application itself. furthermore, i prefer to mount relevant configs and folders which make backups more straight forward, in my opinion. i used our current installation in a test setup and switched to the proposed strategy and everything seems to work.
can you think of any issues that may come up doing it this way?
here is the compose file i used:
thanks and kind regards!
The text was updated successfully, but these errors were encountered: