Databases

I love how docker, especially docker compose has changed life of (server) software distribution. It is just like two or three commands and you can host your own website, blog, wiki, photo gallery. It is also just few clicks in IDE or commands in CLI to have full work environment ready to test your new feature. With all dependencies, all stuff that you would miss or use wrong version of.

But...

There is also a quite big downside - If you are using a lot of docker composes predefined by software authors, then you can became a dependency hoarder. For example how many databases you need for 10 apps that are hosted from your home server?

10? 5? 1?

That was something that hit me yesterday while I was exploring why my Raspberry Pi have so high usage of RAM. It was ... 1 Influx DB, 3 MySQL, 6 PostgreSQL. Now after about two hours of playing I have still 10 DBs but with only 3 DB engines running instead of 10.

My laziness ... or just ease of use of these predefined docker compose files... created a sick env that had SIX running engines of PostgreSQL on ONE small raspberry Pi. It was taking so much RAM and CPU cycles that I really see a difference now after merging them to be just 3 engines with multiple databases on them.

So... I will still use docker compose yamls, I will still be lazy and will use these predefined defaults. But I need to remember that if software that I am trying is good enough and I want to hold it on my server, then I need to do another migration.

Because it is much easier to remove whole setup from docker compose file from my rpi then removing single db from an engine that hosts multiple production-like dbs that I want to still have working... Whoever never misspelled filename for rm command can now laugh, but I had this mistake.