Recommended production docker setup #934
Replies: 1 comment 2 replies
-
How to set this up for your use case depends a lot on what you plan to do with it. If you plan to use WordPress in the "classical" way where it auto-updates itself, plugins are installed via the web UI, etc, then your options are pretty limited (you'll need to do something to ensure only one instance ever attempts the auto-upgrades and you'll need to have some kind of shared storage across your instances for all of the WordPress installation directory, as you've described). If, however, you have a mostly static instance or only care about a fixed set of plugins/themes and want to perform upgrades via Docker image rebuilds, then you should be able to get away with something more targeted like only sharing If you set your container's I think the most important thing to keep in mind is that the automatic upgrades exist primarily for security updates, so you'll want to make sure whatever you set up has a quick redeployment time and that you're proactive about applying updates. |
Beta Was this translation helpful? Give feedback.
-
What is the recommended docker setup for production if you want to have several Docker instances?
From here:
https://developer.wordpress.org/advanced-administration/security/backup/files
and here:
#924
Seems we need to persist /var/www/html
But then do we need a shared volume with all the code to be able to run more than one machine? Isn't this going to impact performance as some other posts suggest due to slower file access?
Some other social media posts suggest to only persist wp-content/uploads directory, and core installation and plugins would come from Docker. I think should work, but then I am not sure about other local files which might be lost during updates which could be used by plugins, or .htaccess mentioned on the first link.
On the link below this solution is also suggested and used with mixed opinions (external db, persist wp-content/updates and replace the rest on every update), but I cannot see an official documentation supporting this.
https://www.reddit.com/r/docker/comments/h95lxv/does_anyone_run_wordpress_in_production_via/
Beta Was this translation helpful? Give feedback.
All reactions