-
Notifications
You must be signed in to change notification settings - Fork 84
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 Joomla with Docker #161
Comments
The proper upgrade path is at this time simply updating via the Joomla admin backend area. There has been work done, that we may in the future introduce a CLI path into the docker upgrade path. I suppose you have your Joomla files and database setup in a persistent state, and in this case I would normally update Joomla in the admin area as normal, then I would stop the container, and remove the image, update the composer file, and start up the container again. Since the image will not override any files or database that has been linked to your container persistently this will only update the PHP environment, and not really effect Joomla directly. But yes there is no docker way to update from one version of Joomla to the next at this time. |
@Llewellynvdm Thx for your response. Is there a timetable by when the update will be introduced through the Docker image? I would like to migrate to dockerised Joomla with update option, but waiting for its support. |
What files need to be persisted? I was aware of the database, what of the actual files in the joomla container? |
images directory for sure. Potentially extensions too |
Okay so we simple do a check here on line 79 of the entry point that stops the rewrite of the existing "persisted" files. And even if we don't find these core files, we give an warring on line 85 with user input possible to stop the process by |
@Llewellynvdm The database fixer fixes only the structure but not the data, and we do data changes in updates. Discovery installation will also not solve everything. |
@richard67 okay can we use the CLI update to resolve this? I mean is there any way currently to get around these limitations from a CLI stand point? Also if we could focus on only the minor versions, and not step over to major versions... not that that will not also be ideal, but just to get the initial update path in place. |
There are options to check for core updates and if some found to update the core with cli, see e.g. php cli/joomla.php core:update I’m not an expert on the cli but as far as I know it runs the database updates and some of the necessary steps after that, e.g. migrating the repeatable fields to subforms when updating from 3.10 to 4. For 5.0 we will have other migrations. If the cli is missing some of that we have to fix that. So all in all cli update should work, but that is of course not docker based. |
What do you mean:
Docker is CLI and if we have persisted files we can check if the needed 'cli' files exist and trigger any commands just like you can in any command line interface (CLI) since we are in the PHP base image. That means we should be able to update our entry-point script and catch these edge-case behaviour as needed. |
@MegaShinySnivy, after examining the Wordpress instances, I honestly cannot discern any difference in the implementation. As I previously mentioned, our method involves checking if the core files persist. If they do, we avoid redeploying the update package, which is essentially the same process as what they're doing. Therefore, if you choose not to persist your website's root folder, it would naturally result in a new file set. But in Joomla this will be like a new installation, since the database config file will also be lost, and even if that was the only file to persist, the database would be "un-update" and possible be giving errors. I've noticed that they possess a completely dedicated set of images for CLI commands. I haven't had the opportunity to work with their tools, so I can't definitively say how it operates. However, I suspect this feature facilitates effortless updates and migration control. Achieving this without the need for an additional set of images is something we're aiming for, there has been some conversations in the CMS maintenance team, and the current consensus would be to test the CLI for Joomla 4+ as a possible means to achieve this objective. Let me know if your willing to run some tests, basically using the CLI command to update your system in a docker container. at the same time as updating the docker image. Should you be interested I could pull up some testing images in my private repository and update the entry-point as I mentioned before. |
I can run some tests, sure, though obviously not in production. Give me the details and I'll spin something up. |
A friend and I are running a Joomla blog via docker compose, and were wondering what the proper upgrade steps are. We don't see a good method for upgrading, as even with the latest container, it is still reporting that 4.1.3. is installed. We assume this is because the database was not upgraded with the main server. What is the proper upgrade path, and how do we perform it?
The text was updated successfully, but these errors were encountered: