zoraxy icon indicating copy to clipboard operation
zoraxy copied to clipboard

[ENHANCEMENTS] Configure reverse proxy using docker labels

Open kinchahoy opened this issue 1 year ago • 8 comments

Is your feature request related to a problem? Please describe. I switched between a few reverse proxy systems until I figured out that I could use https://github.com/lucaslorentz/caddy-docker-proxy to auto configure my reverse proxy via docker labels. While Caddyfiles are wierdly complicated, it would be amazing if you could autogenerate reverse proxy settings from docker labels (essentially just subdomain.domain.duckdns.org + port)

kinchahoy avatar May 19 '24 02:05 kinchahoy

Hi @kinchahoy ,

I don't personally use docker for my setup so I have no idea how this can be done. But I guess @PassiveLemon should have some clues on how this can be achieved.

tobychui avatar May 19 '24 02:05 tobychui

Personally, I think this is fairly out of scope. While it would be a neat idea, I feel its a bit of a complicated setup for something that is intended to be configured through a GUI.

PassiveLemon avatar May 19 '24 02:05 PassiveLemon

Here is the quick case for it:

  • Most people who'll be interested in something like zoraxy as a reverse proxy will be running 3+ services.
  • It's pretty typical for folks to use docker / portainer etc. to run those services (simply because they are the easiest way to stand them up.
  • Absolutely nobody can remember what wierd port number each of the services wants to live on (why is Home Assistant 8123?)
  • The only place you pay attention to the port is when you stand up the service for the first time (via docker / portainer etc.)
  • That is also when you are most likely thinking about what you want to call the subdomain for that service

Essentially - it saves people having to stand up a service, then come to zoraxy remembering the port number just to set up the reverse proxy for it.

If you are opposed to getting grungy with docker labels (which I agree are kinda wierd), could we do a scan for running docker containers and their ports and offer a quick GUI option to reverse proxy them? e.g. portainer-ce has 9485 open, click here and provide a subdomain to reverse proxy it.

kinchahoy avatar May 19 '24 03:05 kinchahoy

This give me a feeling that this is a typical X-Y problem kind of feature request. So in summary, you want a service discovery tool for listing all the existing service by port scanning?

Also one thing worth mentioning is that Zoraxy is not designed for running inside docker. Many features like mDNS discovery, IP scanning and WoL don't work in docker, so optimizing docker user experience will not be inside my to-do list any time soon.

tobychui avatar May 19 '24 04:05 tobychui

The point is that if you are standing up a service behind a reverse proxy, you want to stand it up with the reverse proxy, not stand it up, then go setup the reverse proxy as an unncessary next step.

Now, of course, if you are not designing for docker, or to front-end services running on docker, then it doesn't make sense.

Can I ask though ... who's the target market for Zoraxy? Who's running a homelab but not running services in containers in 2024? How are they running them? VMs?

kinchahoy avatar May 19 '24 05:05 kinchahoy

@kinchahoy Hmmm I guess you misunderstood something.

Zoraxy is not a startup company nor a commercial project. There are no "target market", I contribute the code myself for my homelab which runs on a distributed NUCs and Raspberry Pis cluster (and didn't use docker). All features you saw in README exists because someone needs it and contributed it into the code base. I do help a bit in tidying them up or fixing minor bugs, but that is what I would do for a feature I don't personally needs.

If you really want this feature, my suggestion will be creating a pull request to this project that add such feature or wait for someone else who also need it and pick up this feature request.

tobychui avatar May 19 '24 05:05 tobychui

The point is that if you are standing up a service behind a reverse proxy, you want to stand it up with the reverse proxy, not stand it up, then go setup the reverse proxy as an unncessary next step.

Now, of course, if you are not designing for docker, or to front-end services running on docker, then it doesn't make sense.

Can I ask though ... who's the target market for Zoraxy? Who's running a homelab but not running services in containers in 2024? How are they running them? VMs?

I use Zoraxy on my hostsystem without docker. Why? Because it can then reach all my services, within a VM, LXC, docker or the host itself. If it would only run in docker, I could not reach services within LXC and vice versa. For example Nextcloud is running on the host for performance reasons, Vaultwarden within docker for an isolated environment. Searx-NG the same. WordPress is running on the host, same as Nextcloud for performance reasons and a second testing installation is running in LXC, so it does not cause problems with the main page.

Almost every service you use in a container has an installguide and there is always a port to use mentioned in it. If you don't know which port your app is listening in docker, you can take a look in Portainer. I have written a guide to setup Zoraxy in docker and connect it Portainer. I think this will be enough for most users. Mostly the users switch from Nginx proxy manager and it has no docker labels support too.

Docker is a great thing for running services easily and sure has its beneftis, but I don't need every service within a container. MinIO for example is just a single binary, like Adguard, so I can run them directly with just a single command.

Morethanevil avatar May 19 '24 05:05 Morethanevil

Zoraxy is a fun project! I was just trying to understand what problem it's trying to solve well. Clearly docker related usecases arn't super important to this effort. Thanks for taking the time to consider this usecase - I do think it would make Zoraxy much more useful to many more people.

@Morethanevil Dockerizing Zoraxy isn't the point - making it easy for homelab types to stand up a service with reverse proxy is.

kinchahoy avatar May 19 '24 16:05 kinchahoy

Closing this as this as this enhancement request does not align with Zoraxy design goal. As always, PRs are welcomed 👍🏻

tobychui avatar Jun 18 '24 06:06 tobychui