TeamPiped / Piped-Docker

MIT License
39 stars 32 forks source link

Replace varnish with Caddy's cache directive #13

Open FireMasterK opened 2 years ago

FireMasterK commented 2 years ago

Or alternatively, haproxy.

kubo6472 commented 1 year ago

Or, or: https://sr.ht/~emersion/tlstunnel/

FireMasterK commented 1 year ago

Partially complete with https://github.com/TeamPiped/Piped-Docker/commit/2480d0dffbe2be69c51faf023332f4b00c92fd7d, Caddy is still left.

We should use the inbuilt cache directive: https://github.com/caddyserver/cache-handler

kubo6472 commented 1 year ago
{
    order cache before rewrite
    cache
}

example.com {
    cache {
      stale 10s
      ttl 10s
    }
    reverse_proxy your-app:8080
}

This is what I've managed to splice together based on that doc you linked. No idea if it works as you want it to, but I think this is the way.

FireMasterK commented 1 year ago

Is it built by default? If not, I think a xcaddy build to use this