ravensorb / traefik-certificate-exporter

Tool to export traefik acme certificates
MIT License
1 stars 0 forks source link

Post Update Hook #2

Open tilllt opened 1 month ago

tilllt commented 1 month ago

Hey there,

me again with a question this time. I am trying to figure out a way to export (or copy) one of the exported certs to a different location, with different ownership & permissions.

An example for this is the Bitwarden Docker setup. As per install instructions it will run with deescalated permissions under a "bitwarden" user, which seems to make sense, security wise.

So, if your exporter tools detects an update, exports the certs, how could I (using the docker installation) change the owner of the bitwarden certificate to bitwarden and probably even move it into the bitwarden setup?

ravensorb commented 1 month ago

Interesting question -- you could use another container running a scheduler like cron that will periodically run a script (copy and chown). That container could have two volumes (one to the exported cert location, one to the bitwarden cert location) so as to make it easy to "cross" between the apps. I have used this container in the past for similar needs

https://github.com/aptible/supercronic