3 ms·
I previously used Dokku and I loved how the HTTP proxy was "automatic". I've moved past Dokku but don't want the complexity of k8s for a home network. I sort of
by Steltek 4y ago
I previously used Dokku and I loved how the HTTP proxy was "automatic". I've moved past Dokku but don't want the complexity of k8s for a home network. I sort of envisioned a system that could read out running container names and create "$name.$domain" proxy entries automatically.
I never got around to it and my current method of automatically generating nginx.conf from a JSON file has a few tricks left, I guess. I guess one additional problem is that I have few things stacked up on a domain and under different "location" entries.
- martontoth 4y agoLike traefik? https://doc.traefik.io/traefik/providers/docker/ https://doc.traefik.io/traefik/providers/docker/
- fuzzy2 4y agoWhile this can be achieved using Traefik, it requires some creative combinations of static + dynamic configuration to get my_container.example.com with HTTPS and HTTP → HTTPS redirects and Let’s Encrypt. The container labels are a PITA. I’m not sure there’s an easier solution though.
- Shish2k 4y agoMy setup does all of those things — HTTP->HTTPS redirect and Let’s Encrypt are handled in the global static config: https://gist.github.com/shish/f346a3102f5d690be2f64f6d1eb7d7db https://gist.github.com/shish/f346a3102f5d690be2f64f6d1eb7d7... And then only the per-container settings need to be set in the dynamic config using container labels
- fuzzy2 4y agoAh, right. In the meantime, they improved the entry point config substantially. When v2 first started, there was no HTTPS redirect and no middleware config to be found on entry points. Never bothered to upgrade my config because it still works.
- jacooper 4y agoTry this, its pretty easy, but it depends on the docker socket. https://github.com/nginx-proxy/nginx-proxy https://github.com/nginx-proxy/nginx-proxy
- Shish2k 4y ago> I sort of envisioned a system that could read out running container names and create "$name.$domain" proxy entries automatically. Traefik does this :) That’s what I’m using for my personal server - one traefik instance, a wildcard DNS entry, and then a docker container named “foo” is reachable at https://foo.shish.io https://foo.shish.io
- francislavoie 4y agoYou can also do this with Caddy, using this plugin: https://github.com/lucaslorentz/caddy-docker-proxy https://github.com/lucaslorentz/caddy-docker-proxy
- jacooper 4y agoThere is nginx-proxy for this, with auto TLS, its pretty good! https://github.com/nginx-proxy/nginx-proxy https://github.com/nginx-proxy/nginx-proxy