matomo-org / docker

Official Docker project for Matomo Analytics
https://matomo.org
Other
834 stars 348 forks source link

Upgrading #354

Open kiropowered opened 6 months ago

kiropowered commented 6 months ago

Hello, What is the correct way to upgrade matomo version when using docker image. Actually we specify the version with the image tag, but since all the source is part of a volume : /var/www/html(docker compose previded here) I am wondering what would happen if we upgrade tag. So what the process to upgrade and doing also all the db migrations without losing any data ? Thank you

tsvetomir-ivanov commented 5 months ago

Hi @kiropowered,

I have the same question as well. So far I have been using the UI to do the upgrades. However, it will sometimes fail.

In any case using the UI updates, does not upgrade the underlying runtime, such as the PHP version or other security updates for the sepcific OS distribution.

I am also interested in getting step-by-step description for the upgrade process. Maybe even adding it to the README file. Thanks

kiropowered commented 5 months ago

I am a new user matomo so I didn't have to update yet. That's why I am worried about the "futur" upgrades.

Making the whole website as volume to be able to do upgrade through the UI is counterintuitive because the image tag is not sync with the source code.

I think some kind of migration system should be implement like being able to :

So the DB should contains the matomo versions and do the subsequents migrations based of the image tag.

It involves a lot of thing to consider to avoid data loss or messing up existing db with that auto-upgrade.

That's why it would be nice to be able to at least trigger migrations via the console tool: In that way we can avoid mounting the whole website(/var/www/html) and have the corresponding image:tag source code and then we just have to trigger the migration

atom-box commented 2 months ago

In case it is convenient as a starting point, I am posting the general process: https://matomo.org/faq/on-premise/update-matomo/

kiropowered commented 2 months ago

It missing the process to upgrade when using a docker image

If the DB upgrade is available using a cli command it's indeed a good starting point.

How the db upgrades are executed if for exemple we are on the version 4.15.1 and try to upgrade to 5.1.0.

Does upgrading the DB using the image 5.1.0 before making the website available gonna be enough ?