Big, Bigger, Docker! I now host everything on Docker
In a recent blog post I talked about how I think, it might be worth it, moving most, if not all of my services on my private server into seperate Docker containers, since that is a technology, I had the chance to learn more about in recent times in my apprenticeship.
What can I say? I did it, and it really was worth it! Let me share the story in a bit more detail with you.
Most services that I run (this website (nginx), Radicale (calender), miniflux (rss) etc.) are available as Docker containers, that allow me to run them in an isolated environment, which, I hoped, would isolate ressources in a way that if one service crashes, all others would stay unaffected.
Alongside moving everything ("most things" would be closer to the truth, but more about that in a bit) into Docker containers, I also decided to increase the ressources (namely RAM and storage) for my server by a bit, so I doubled my storage as well as my RAM – and as of writing this, actually even trippled my RAM.
Sadly, the storage upgrade didn't go as smooth as I hoped it would. The extension didn't work and support told me, I'd need to back up my server and then a technician would look into my server, because my filesystem seemed to be corrupted. I first wanted to go with this option, but then, after I made my backup, decided it would be a cleaner and fresher start, if I just set up the server entirely fresh.
So now, I have a fresh VPS, all original data deleted (of course all data I wanted to keep, has been backed up locally in a tar-file). This was now my chance to start fresh, and do everything a bit more professionally. So I set up all my services inside Docker containers, even trying to create one Docker image myself, where no official image exists, by grabbing the source from GitHub and baking it into an image myself. But since I am not yet very experienced with compiling software, I ran into some issues and just run the pre-compiled software without a Docker container now, even though I could probably also just throw the pre-compiled program into a Docker container with Ubuntu in it and just skip the step of compiling it from source myself, but that seems to boring for me.
Another exception are my nginx services. Claude told me, it'd be easier just leaving them on my main system, not isolated inside a docker container – and it certainly is. I could probably have done SSL-certifying inside a Docker and mount bind-volumes for my containers with nginx to grab the files for hosting this blog, but I decided to go with Claude's proposal for an easier set-up.
I problem I'd like to share has to do with setting up Radicale. I of course backed up my calender entries from the old server. In total it were around 300 entries across 4 calenders. I experimented a lot, how to get them into my new Radicale Docker container, but I always struggled with the right permissions a little. I think, by now I am a little more firm with permissions, so I think I could have done it with batch copies, but when I set up this container, I really needed back the calender entries in my devices again, with read and write permissions for Radicale, so I decided for a less elegant way: Using curl I added 300 entries manually. Of course, I had AI to my side to write a bash-script which would initiate each file transfer for me. But I was still prompted for my calender password a total of 300 times. So I had major fun pressing Ctrl + V, then Enter for some 10 minutes on repeat.
I think this shows, I still have some things to learn, so that this doesn't happen to me again, in the future.