Closed ameeno closed 1 year ago
Hey. Didn't know Sablier. Looks interesting.
Didn't have time to dig much, but I think everything will work out of the box if you give it a try.
Build a custom docker image with both caddy-docker-proxy and Sablier plugins.
You can generate Sablier configs using labels like:
caddy.sablier.group = mygroup
caddy.sablier.dynamic =
I found some info in this readme: https://github.com/acouvreur/sablier/blob/c3518ff6ba362c11837a55d19f06a971066e3661/plugins/caddy/README.md from the pull request.
More info on how to create labels: https://github.com/lucaslorentz/caddy-docker-proxy#labels-to-caddyfile-conversion
Hello.
I've become very interested in putting my high cpu/ram using docker containers to sleep when there is no traffic. My search has led me to a traefik plugin called Sablier, which aims to shut down/ put to sleep docker containers when not used by acting like a middleware.
recently Sablier has added a beta caddy plugin in this PR: Caddy reverse proxy integration
Now i wonder if it is possible to have this docker proxy add Sablier support and configuration via labels to put containers to sleep when they do not receive traffic after a while.
Obviously this should be completely optional and the feature should be off by default with the ability to specifically enable it manually on containers you want to.
Ideally i should be able to create an import for this feature similarly to how I create an import for authelia. (see example):
My idea is if i can create a similar label config for sablier usage, and import that as needed to specific containers, a plugin with caddy/sablier built in would be an awesome new feature.
what do you guys think?