-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Check if volume contains older version of WordPress and update it #272
Conversation
Thanks for submitting this @flojon! There's a bunch of us waiting for this to go in 🌈 |
You're welcome! 😁 |
I am pretty new to docker as well as wordpress so please forgive me if this is a dumb question. If I understand correctly the update will happen when the container is run NOT built. If I have dev/staging/production deploys won't this mean I have moving scripts when I go to run in each environment? I think I understand having the init this way since it is dependent upon a database to create base tables. But if I have an existing site, I feel like I would just want to run a docker build, include my site, and have it update at that time. Then I can deploy the same static image everywhere I want? Thanks! :) Also either way this seems like a great addition! |
Wordpress docker includes the code for a given version of Wordpress and this code is deployed to a volume on the first run of that docker image. What this patch does is to check at startup if the version of Wordpress contained in the image is newer then the version installed in the volume. If so it will upgrade Wordpress. I think we are many people that find it surprising when you upgrade the docker image and the Wordpress version is not upgraded... That's what this patch is trying to fix. |
Thanks for the reply! I'm surprised people are mounting the wordpress code itself. Is there an advantage for doing it this way? Why not just run the code version in the container you are pulling? Then you only need to mount and maintain the uploads folder? Thanks for your insight on this, I am trying to develop a strategy for my own wordpress sites. My initial approach is to have the docker image contain my wp-content and just use the wordpress code in the image. Then I only mount the uploads folder. So everything is contained in the image. Seems updating would be as easy as doing a new build. It doesn't seem like people are doing it this way though. |
Why isn't this being merged? There is no proper way to update WordPress in Docker containers so this must be merged. It's useless otherwise. |
abandon WordPress [infrastructure], go https://roots.io/bedrock/ |
I also need this functionality. When is it going to be accepted ? |
Sorry for the long delay. I'm inclined to share my opinion from #156 (comment) here -- namely, I don't really see a compelling reason for us to implement this any more (and thus believe we should simply remove this old I've included in #156 (comment) notes for anyone who wants to disable the WordPress auto-update functionality (which is now possible trivially thanks to #142) and instead control WordPress versioning strictly with Docker image updates. |
See docker-library#156 (comment) and docker-library#272 (comment) for details.
If the volume already contains a version of WordPress compare it to the version contained in the image. If older then copy the new version to the volume.
This should solve #156 also see #174