vfarcic / docker-flow-proxy

Docker Flow Proxy
http://proxy.dockerflow.com/
599 stars 17 forks source link

mapping multiple ports per service #111

Open raarts opened 7 years ago

raarts commented 7 years ago

I am running influxdb which has a web interface AND an API, so I'd like to tell the proxy about the two ports. I don't know if they can combined behind one proxy port, and if not, that would require opening a different port on the proxy itself.

vfarcic commented 7 years ago

You can specify multiple ports by appending an index (e.g. port.1=1234, port.2=4321). Please note that in that case servicePath needs to be indexed as well (e.g. servicePath.1=/something, servicePath.2=/else).

All that being said, you probably do not want to add both ports to the proxy. My guess is that you want to have the UI accessible (for example from a browser), and other services to be able to connect to its API. If that's the case, I'd add only UI to the proxy and make sure that influxdb and services that need to use it are attached to the same network.

Please let me know if that's what you were looking for. Please let me know if it's not and I'll write an example.

raarts commented 7 years ago

You are right and thanks for the indexing tip

Tillman-Z commented 6 years ago

Sorry for re-opening but I am struggling with multi domain SNI routing. My HAProxy config uses two frontends. One binds to :443 ssl and checks the req.ssl_sni to either send the calls to one or another service. The second frontend binds to :5269 (and yes, you might have guessed it) and sends the calls to my ejabberd service. Can I accomplish this directly with DF env vars in my compose file or do I have to modify the HAProxy.cfg accordingly?