I want a blog. Why? Well I got stuff I want to share, fat chance nobody is interested but /care, still want one. What’s the biggest blogging platform? WordPress probably.
I like the workflow and themability is great so this is going to be it. For hosting there are roughly 2 options.
- Self-hosted: I’ve got the infrastructure, so this is an option.
- Paid: costs money, paid yearly while I don’t even know if I keep this around for a year.
I’m not really interested in the technical part that comes with the hosting and would like to have it portable. Being able to quickly move the setup between servers is a big plus.
So enter Docker.
There is an official WordPress Docker image, so that’s great. WordPress seems to have a fine update system, also covered.
Docker-WordPress setup is quite easy. And I have already an apache server running that can act as a reverse proxy.
Running a Docker-WordPress-MySQL container is really easy.
Create a ‘docker-compose.yml’ (change the passwords where applicable)
And run ‘docker-compose up -d’.
After a short while everything will be set up and your WordPress installation is accessible on host:8000.
The backup strategy will be to backup the volumes I linked in my docker-compose file. (Database and data). Haven’t tested it, but moving it over to a different server should be as easy as copying over the data directories and docker-compose file and starting it.
That’s it, a running WordPress site, hopefully portable, manageable and easy to backup.