Your software
My Mautic version is: 5.1.0
My PHP version is: fpm-8.1
My Database type and version is: 11.3.2-MariaDB
Your problem
My problem is:
Following the official example for using Mautic 5 with docker we try to update from 5.1.0 to 5.1.1 by updating the provided image.
Starting over with the docker compose up -d the mautic containers are recreated but the Mautic version is still 5.1.0. Deleting the Docker volume docroot and restarting the Docker stack recreates docroot with all files and the new Mautic version is active and working.
We do not understand how the update strategy for Mautic on Docker using php-fpm/nginx is. We need to automate the update process in pipelines and always removing the docroot volume is not an option althogh keeping media/files|images in separate volumes. Could someone please explain how the proper way is to update Mautic in Docker with php-fpm/nginx?
Thank you!
These errors are showing in the log:
./.
Steps I have tried to fix the problem:
Deleting Docker volume docroot.
Running bin/console mautic:update and mautic:update --finish results in the install workflow in the UI.
I just tested the “basic example” with Apache – the update from 5.1.0 to 5.1. works by just pulling the new image and recreating the container on base of the new image.
It doesn’t work with the Nginx example image.
The difference between the two examples is that in the Apache version, “docroot” is located internally in the container, not on in a volume, because apache is running as a service internally and with Nginx, “docroot” must be an external disk because Nginx needs to access certain assets from “docroot”.
It remains unclear how Mautic handles the files in docroot or why it does not update the files from docroot when they are located on a volume.
We worked further on this topic and understand that the fact that docroot is in an volume it is overlaying the docroot folder in the Mautic image. The image is providing the updated docroot but the old files are still in the volume.
This is so obvious that we did not see it We where expecting some magic Mautic copy voodoo…
Our solution is to create a docroot volume dedicated for the nginx container which is populated by rsync in entrypoint.sh of the mautic_web container.
This works now like expected. A statement about that topic in the Readme - mautic container does not update with the nginx/php-fpm example configuration - would be helpful for others i think.