Why containerize my blog? Mainly because its an interesting exercise in CICD. If you’re in IT, most likely you hear docker and CICD, continuosly.
Does this make sense? Imo, no. Generally a personal blog is not a good candidate since I’m not making code changes to the site and I don’t need to ensure a set of functionality.
However, I can appreciate CICD’s inherent redundancy and the ability to apply this paradigm to infrastructure as code.
Currently, all the services running this blog are in containers: mysql, nginx, and fpm. However, docker has some odd issues:
- docker does not play with other users. The issues arise when your container’s services run as users that don’t exist on the host and vice versa. The end result is you can’t modify files unless you run the container as the host user, which most likely does not exist in the container, which may lead to further oddities.
- Why does docker document say in order to make a backup of a volume, you must spin up a new container? https://docs.docker.com/storage/volumes/#backup-restore-or-migrate-data-volumes
- ^ The data is in the /var/lib/docker/volumes directory…
- Each official service container requires customization: for example, the official php containers do not have the mysqli extension
Todo:
- I need to be able to auto deploy to a new server which should include downloading images and volumes as well as the image configuration files. Tied into the server deployment will be the backups.