movableink / doorman

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

Add Doorman config file initialized from environment vars #28

Closed pataquets closed 9 years ago

pataquets commented 9 years ago

Fixes #27

pataquets commented 9 years ago

Bump. I have an almost working Docker image that I would like to publish/contribute that depends on this being upstreamed to work. This way you'll be able to launch a Doorman instance with just a single command from any Docker-capable host. Later on, I will try to figure out how to make email arrays from env vars into the config.

mnutt commented 9 years ago

I went ahead and merged this because it really makes docker support a lot easier. But another big upcoming feature is multiple-domain support, and I'm not sure how this will play with that. (there isn't a good way to represent complex data structures in environment variables) I guess the default behavior can be to only support a single domain if you're using environment variables, but if you have any other good ideas for how to solve it I'd like to hear them.

pataquets commented 9 years ago

BASH has arrays: http://www.tldp.org/LDP/Bash-Beginners-Guide/html/sect_10_02.html However, I don't know if JS can handle array env vars, but it might work. Otherwise, pulling multiple values by splitting one single env var as I've seen in recent commits looks like a nice solution. Even most easy to grasp at first, since arrays are quite a bit more obscure and less common in BASH.