One thought is to make a really thing alpine container with mysqldump, borg and borgmatic installed on it. Then mount in the borgmatic config.yml that has the borgbase details in it and then pipe the output of mysqldump into that so it is shipped off right away. We could install other backup utilities onto that thin image so that it could be a more general solution. This sounds simple enough that it might work 🙏
The worst bit, and what’s blocking me merging this into main, is that I’m not sure how to selectively disable adding the simplesaml volume to the mediawiki service if SAML_ENABLED=0. @decentral1se any ideas on that?
I think your best best is to go with another compose file for this. You can override them easily with something like docker stack deploy -c compose.yml -c compose.saml.yml or something like that. In your compose.saml.yml you only need to write the high-level service key and the volumes + the new volume. This might mean you need to abstract SAML_ENABLED=0 out of your config in some way? I hope that is clear...