I'm starting to get comfortable with using Docker and Traefik to make hosting web services on my server more isolated, robust, and portable. I have one docker-compose file that runs
* a Traefik
container, which automatically obtains Lets Encrypt SSL certificates for my web services,
* a Zap server,
* and two separate Grav
Another docker container running a Discourse server, which is independently managed by Discourse's wrapper scripts, is reverse-proxied and SSL-provisioned by Traefik seamlessly.
This allows so much freedom when self hosting. I don't have to worry about how Ruby on Rails works or how to install the right version of PostgreSQL that Discourse uses. The Zap server happily uses the MySQL database running in the separate MariaDB container. The Grav instances may have their own versions of PHP and its extensions that they prefer that are different from Zap, but I don't have to maintain consistent versions of them because the containers are isolated. Another benefit is that, if one server gets out of control -- like how Hubzilla would sometimes spawn too many Apache processes and bring down everything -- the other containers should in general be unaffected. This lets me squeeze more value out of a virtual private server.
The next steps are to get my Matrix
homeserver and my Nextcloud
server migrated to Docker containers as well.