Skip to content
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

Upgrade problem using docker clear #197

Closed
rusty1281 opened this issue May 5, 2020 · 11 comments
Closed

Upgrade problem using docker clear #197

rusty1281 opened this issue May 5, 2020 · 11 comments
Labels

Comments

@rusty1281
Copy link

Hello,

I have a running version 3.13.3 using the latest tag image. When I try and upgrade to 3.13.5 image using clear, the container switches to a new image, but the version is still on .3. Checked the version.php file and also there is the notification on the dashboard saying the same.

Should this update be done via UI or am I doing something wrong? Why is the recreated container using the new image but still presenting the old version?

Thank you in advance for any info.

@4ev
Copy link

4ev commented May 6, 2020

The same question?

@customizeXF
Copy link

Same here...

@artm
Copy link

artm commented May 18, 2020

The first time the container is run it copies the code to /var/www/html which is a persistent volume. That's the version of the application that is running. Whenever the container is restated it checks for a file /var/www/html/matomo.php and if it is present leaves the volume alone. Which means the container with a newer version of matomo will still run the old version of matomo. Upgrading via UI will update the code on the volume, but there "correct" upgrade order (first container than the application or other way around) and even the necessity to update the container altogether are undefined.

This happens because matomo's architecture is incompatible with stateless containers philosophy of traditional docker applications.

@j-zarp
Copy link

j-zarp commented Jun 5, 2020

I had the same question:
In light of @artm's answer, what would be the way to go for a clean upgrade?

  1. upgrade via the web interface, then pull the new image and rebuild the container
  2. pull the new image, recreate the container, then upgrade via the web interface
  3. pull the new image, erase the volume altogether and rebuild it with a new container
  4. something else?

Just as a side note, I'm using Nextcloud, and they have a rather nice solution where, once the new image has been pulled and a new container is created, it checks whether there was an upgrade and triggers an update automatically if needed:
see (https://github.com/nextcloud/docker/blob/master/docker-entrypoint.sh#L87)

@J0WI J0WI added the question label Sep 12, 2020
@J0WI
Copy link
Collaborator

J0WI commented Sep 12, 2020

What is "docker clear"?

@davidlemaitre
Copy link

@jdespraz answer 2 for me.

This is my upgrade process :

  1. docker-compose pull
  2. docker-compose down
  3. docker-compose up -d
  4. Database upgrade if requested
  5. Check Matomo version using this command docker-compose exec app printenv MATOMO_VERSION

Has worked until now. I'm still waiting for the release of version 3.14.1 of the Docker Matomo image. See #213.

@jkjha
Copy link

jkjha commented Jan 5, 2021

This is really very confusing. What should be the upgrade path for docker images? Matomo team, can you please create a documentation for this.

@rusty1281
Copy link
Author

This is really very confusing. What should be the upgrade path for docker images? Matomo team, can you please create a documentation for this.

The way I ugrade.

  1. download the fresh docker image.
  2. run the "clean" process (destroy the old container and start a new one with the new image) or run "recreate" via portainer
  3. upgrade via Matomo UI

@jkjha
Copy link

jkjha commented Jan 6, 2021

yes above workes. Thanks @rusty1281

Here are detailed steps that I followed for my upgrade (My Mysql DB size is >90GB, so i prefer command line upgrade)

  1. Get the Mysql dump of the data (Will be needed only if something unexpected occurs).
  2. Download latest docker image and deploy it to your k8s cluster.
  3. Go to config/config.ini.php file and add maintenance_mode = 1 in [General] section.
  4. Add a new section in config file:
   [Tracker]
    record_statistics = 0
  1. Run console command: php console core:update

If all works fine, remove config that you did in step 3 and step 4 and check the UI. Your matomo should have been upgraded.

@tholu
Copy link

tholu commented Jan 20, 2021

@davidlemaitre Have you successfully updated to Matomo 4 this way?

@J0WI
Copy link
Collaborator

J0WI commented Nov 26, 2022

duplicate of #248

@J0WI J0WI closed this as completed Nov 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants