movableink / doorman

HTTP Proxy + OAuth
MIT License
167 stars 52 forks source link

Multiple backends #47

Open tarantegui opened 8 years ago

tarantegui commented 8 years ago

It would be great if doorman could manage different backends after login.

Thank you in advance!

mnutt commented 8 years ago

Hi @tarantegui, this is a planned feature! We actually use this in production at my company, you can find the branch at https://github.com/movableink/doorman/tree/multi-domain. I'd like to merge it into master but have had some trouble figuring out how it fits in with Docker. (docker configures via environment variables, which don't play well with complex multi-domain configurations)

mnutt commented 8 years ago

And just to clarify, the way in which it manages multiple backends is that you point different domains/subdomains at doorman and it uses virtualhosts to choose the correct backend.

pataquets commented 8 years ago

I would like to help with that. Is the change backwards-compatible with single-domain Doorman? If a 'default' fallback virtual host already exists, that should be compatible with current Docker tooling. With an appropiate note in the Docks warning that multi-domain is not (still) available in Docker, we can later figure out how to do it, when code is released.

My suggestion would be a UNIX-style ".d" directory (sites.d or the like) to be included from the root/default config.js where users could bind-mount more virtualhost configs, one per file. How does that sounds to you?