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

[bitnami/matomo] Exclude matomo.js from being rsynced, same as config.ini.php #76460

Open
benemart opened this issue Jan 21, 2025 · 1 comment
Assignees
Labels

Comments

@benemart
Copy link

Name and Version

bitnami/matomo:5.1.0

What is the problem this feature will solve?

Some officiel plugins like Media Anaytics modify the tracker file matomo.js

With the actual bitnami image, all files except config.ini.php are made persistent due to 33b63ac

 4.15.0-debian-11-r20
From this version on, all Matomo files are persisted (MATOMO_DATA_TO_PERSIST env var). During the upgrade process, they will be replaced (except the config.ini.php file) as suggested in [the official documentation](https://matomo.org/faq/on-premise/update-matomo/#the-manual-three-step-update)

What is the feature you are proposing to solve the problem?

Exclude matomo.js from the rsync command, same as config.ini.php

in /rootfs/opt/bitnami/scripts/matomo-env.sh

export MATOMO_TRACKER_FILE="${MATOMO_BASE_DIR}/matomo.js"

in /rootfs/opt/bitnami/scripts/libmatomo.sh

rsync -a "$MATOMO_BASE_DIR"/* "$MATOMO_VOLUME_DIR" --exclude "$(realpath --relative-to="$MATOMO_BASE_DIR" "$MATOMO_CONF_FILE")" --exclude "$(realpath --relative-to="$MATOMO_BASE_DIR" "$MATOMO_TRACKER_FILE")"

What alternatives have you considered?

As possible alternative:

  • specify the plugin tracker plugins/MediaAnalytics/tracker.min.js in the the header as specified in the Media Anaytics documentation but it implies to modify the code of each website
  • use a custom post init script to restore the matomo.js file from a previous save
@carrodher
Copy link
Member

Thank you for bringing this issue to our attention. We appreciate your involvement! If you're interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.

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

2 participants