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

Matomo docker volume causes issues when upgrading Matomo's version #361

Closed
joshdentremont opened this issue Oct 6, 2023 · 4 comments
Closed

Comments

@joshdentremont
Copy link
Contributor

The way that the volume for Matomo is configured causes it to block updates when you move to a new version of Buildkit that has a newer version of Matomo. There have been a few suggestions on how to deal with this issue here (#356)

I don't use Matomo, so I don't know the best way to deal with this, but it should probably be addressed by either changing the way the volume is mounted so that upgrading doesn't cause issues, or given a workaround for upgrading in the instructions here (Islandora/documentation#2264)

This will also likely be an issue in the site template, because it looks like the volume mount is the same, so whatever we do, we should do there too.

@joshdentremont
Copy link
Contributor Author

Following Gavin's instructions at #356 (comment) I was able to update my matomo. These are the steps that worked for me:

docker compose cp matomo:/var/www/matomo/config/config.ini.php ~/Desktop
make down
change matomo volume location from /var/www/matomo to /var/www/matomo/config in build/docker-compose/docker-compose.matomo.yml
docker volume rm {COMPOSE_PROJECT_NAME}_matomo-config-data
make -B docker-compose.yml
make up
docker compose cp ~/Desktop/config.ini.php matomo:/var/www/matomo/config/
docker compose exec matomo chown nginx:nginx /var/www/matomo/config/config.ini.php
make down
make up
go to https://islandora.traefik.me/matomo/ and click upgrade matomo at the bottom 

image

I have not used Matomo, so I have no tracking data. This should not be destructive to existing data, but it would be good if someone with Matomo data who is running Buildkit 1.x could test these instructions as well.

Changing the location of the volume is not necessary for this upgrade, but it should make it so future upgrades don't require doing these steps

@joshdentremont
Copy link
Contributor Author

joshdentremont commented Nov 17, 2023

This may no longer be an issue once the following PRs go through:
Islandora-Devops/isle-buildkit#306
Islandora/documentation#2271

Changing the volume location in isle-dc is a little more involved than in site template. It would be nice if new sites in isle-dc were created with the new volume location as well, but anyone with an existing site would need to follow the instructions above to change their existing volume.

I'm hoping to discuss this at the tech call next week.

@joshdentremont
Copy link
Contributor Author

It looks like the way we are mounting the volume is the recommended way: https://hub.docker.com/_/matomo

There are several suggestions at matomo-org/docker#248 on how to go about this. I think we need to make sure that nothing is lost from the volume when we upgrade, so it might have to be done through the web UI, or by only deleting matomo.php.

I think this needs to be tested by setting up a new site on 1.0.10, setting up matomo so we get some data in the database, and installing plugins. Then we should try updating to 2.0.10 and see if we can update matomo via the web UI without losing the existing data.

If that works, it should probably be documented here: https://islandora.github.io/documentation/installation/docker-maintain-isle/

@joshdentremont
Copy link
Contributor Author

Given that we are going to remove Matomo from site template and isle-dc I think we can close this.

Islandora-Devops/isle-site-template#41

@joshdentremont joshdentremont closed this as not planned Won't fix, can't repro, duplicate, stale May 31, 2024
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

1 participant