#weeklyreview 21/2025
On Sunday I did a day trip to the countryside. Just a short weekend and on Saturday we stayed in Berlin for the Jugendweihe of my niece.
Database consolidation
I am running several services in Docker Compose setups on my virtual machine at Hetzner. Docker compose is very convenient as it encapsulates complex application deployments in a single file. They are nicely isolated from each other and can’t easily break their neighbors with dependencies.
The drawback is, that I have a large amount of duplicate database instances running. I was counting 8 PostgreSQL instances on my machine.
That seems a little wasteful in terms of memory and I/O. So I decided to explore consolidating the databases into a single central one. Turns out that this wasn’t too hard actually. Set up the DB in their own docker compose file and into its own docker network.
Docker manages the name resolution on its networks. I just had to add the new database network to the other setups and attach the containers which need database connection to that network. Then reconfigure the app to use the different db host.
Before that I pg_dump
‘ed all the app databases and created new databases in the central instance. Each app got its own credentials with permission only for their database. Imported all the dumps and then restarted the apps. Done.
Down from 8 to just 2 database instances now. The last instance is the one from the AIO setup of Nextcloud that I have not yet consolidated.
Bot Blocking
The week before I had started blocking Bots (mainly AI scrapers) centrally in my setup by serving the /robots.txt
for all my services from a central place.
Of course some Bots simply ignore this setting and still fetch content from all over the place. So I finally decided to block Bot users completely based on their user agent strings.
For this I’m using a Traefik plugin which recognises the bots by their user-agent string and responds to their requests for an HTTP 403 – Forbidden.
The plugin needs to be defined in the static configuration of Traefik. The configuration for the user-agent strings can be dynamic Traefik config. I’ve put this into a file so I can change the file without the need to restart Traefik.
Then each service which should make use of this must configure the new middleware to block the bots. I’ve documented my setup in a little repo: https://repos.mxhdr.net/maxheadroom/Traefik-Bot-Blocking
Tomato outside season
We’ve finally potted our tomato seedlings on the weekend to stay outside. Since about February we were hatching inside from seeds and bringing them outside during the day. But until recently the nights were still much too cold for them to stay outside. In fact just last week we still had nights with -5º C which caused quite some damage on the surrounding trees and bushed.
Hoping that these cold nights are over and the plants will survive to bless us with a good harvest later this year.
Fediverse Reactions
#database #enEN #gardening #traefik #Uckermark #weekly #weeklyreview #wochenrueckblick