snikket-im / snikket-web-proxy

Apache License 2.0
6 stars 8 forks source link

Traefik support #5

Open decentral1se opened 2 years ago

decentral1se commented 2 years ago

Hi folks :wave: We're working on a Co-op Cloud recipe for Snikket and as discussed previously on the dev chat, we're using Traefik as our proxy. We've discussed a bit how to handle this but in the end it seems to be easier to keep up with the developments of this repo if we can just somehow disable automatic lets-encrypt functionality here. Would that be something you'd consider making optional / pluggable? It seems to just require some conditional env var to happen in and around the entrypoint to turn it off.

decentral1se commented 2 years ago

I'm opening up https://github.com/snikket-im/snikket-web-proxy/pull/6 just to show you what we're working with now to "turn off" the automagic letsencrypt functionality. We'll pipe env vars into https://github.com/snikket-im/snikket-web-proxy/blob/main/render-template.sh via the environment: ... stanza in our compose configs. Might be handy just to see what change set we're working with.

decentral1se commented 2 years ago

I'm trying to track back and clear up what is required here, and I think it is "just" this change: https://github.com/3-w-c/snikket-web-proxy/commit/bcec18a66f5a61aace1d2a646afda5bbf2de9b79. The change is explained in the 5th point of https://github.com/snikket-im/snikket-web-proxy/pull/6#issuecomment-955749390. If anyone can see a way forward here, I'll happily try to implement something. I'd love to get back on the mainline images for snikket.

mwild1 commented 8 months ago

I'm working on a new release, and I've merged what seems generally applicable from the commit referenced above. Rather than patching the image, the appropriate approach now would be to add e.g. a httponly template with the desired changes (by adding a volume or a new image layer), and then set SNIKKET_TWEAK_WEB_PROXY_PROTOS=httponly and SNIKKET_TWEAK_WEB_PROXY_RELOAD_INTERVAL=inf.

I hope this is useful!

damufo commented 4 months ago

Very thanks to developer snikket-im. Please add support for traefik and add example in https://snikket.org/service/help/advanced/reverse_proxy/

Sythelux commented 1 month ago

What is the state of this? Can it be tested? I can provide feedback.