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

The 4.8.0 tag image seems still running a 4.7.1 version of matomo #281

Closed
idrissneumann opened this issue Mar 18, 2022 · 7 comments
Closed

Comments

@idrissneumann
Copy link

Hi.

I upgraded the docker images we're running for our on premise instance from 4.7.1 to 4.8.0 :

Screenshot 2022-03-18 at 08 32 10

However, the web application seems still running on the 4.7.1 version:

Screenshot 2022-03-18 at 08 31 44

Of course, this has been tested on a private navigation window.

I also inspect inside the container:

Screenshot 2022-03-18 at 08 40 04

Thanks in advance.

@idrissneumann
Copy link
Author

idrissneumann commented Mar 18, 2022

This is because the /var/www/html is a volume in order to keep the config.ini.php. I'll try to remove this volume and make a template of the config.ini.php file injected at every deployments in order to make this image as stateless as possible. It would be more "cloud native friendly" if it was an image with environment variables based config.

@idrissneumann
Copy link
Author

idrissneumann commented Mar 18, 2022

So here's my workaround :

1/ Do not mount /var/www/html as a volume

2/ Templatise your config.php.ini and inject it in the container newly created with a volume (the path inside the container: /var/www/html/config/config.php.ini).

With that you'll be able to consider your container as "stateless" and evict and recreate it.

Here you'll find an example of template and injection of this file as a volume with this ansible role: https://gitlab.comwork.io/oss/ansible-iac/ansible-matomo

On K8S, you can achieve the same thing with a configmap.

I'll let this issue open if you want to use it for create "cloud native friendly" and stateless images with only environment variables to configure. But no problem if you prefer to close it and move on to something else, it's not a critical issue at all :)

Thanks

@ontheair81
Copy link

It is good to know that there is a workaround! But I would like to know how the "official" way is to deal with this; e.g. the way how the developers of Matomo get rid of these false upgrade notifications in the web application.

Maybe by doing an additional upgrade in the web application after updating the image and container?
Or just ignoring the false upgrade notification in the web application (that's what I do at the moment)?

Would be nice to know how this is originally meant to be done!

@ghnp5
Copy link

ghnp5 commented Apr 14, 2022

See related #161
Just experienced the same thing! Upgraded the image, restarted the container, and still on the old version, because the mounted /var/www/html/ hasn't updated at all.

There needs to be a check on start up to copy the files over or so! (without replacing important things in the state, like config.ini.php)

@freechelmi
Copy link

So I just wipe the /var/ww/html on upgrade postactions and overwrite config.ini.php

Does it sounds enough to you ?

@ghnp5
Copy link

ghnp5 commented Apr 14, 2022

What I did was:

  1. upgrade Docker image
  2. restart
  3. upgrade through the Matomo dashboard (from the button at the top that says there's a new version)

@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
None yet
Projects
None yet
Development

No branches or pull requests

5 participants