movableink / doorman

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

Docker Support #30

Closed rosstimson closed 9 years ago

rosstimson commented 9 years ago

I wanted to run Doorman via Docker so created a very simple Dockerfile for this. I thought perhaps it would be useful to have a 'official' version and container on the Docker Hub Registry.

I would suggest it is run with a custom config like so:

docker run -d -p 8085:8085 -v /my/custom/config:/usr/src/app/conf.js doorman

I've just discovered Doorman and plan on using it for a project I'm working on hence my ignorance, but if you can use environment variables in the conf.js file. Allowing env vars within the conf.js file would enable users to inject in important config details like so:

docker run -d -p 8085:8085 -e YOUR-GITHUB-APP-ID=myid -e YOUR-GITHUB-APP-SECRET=xxxxxx doorman

Hope this looks ok and is of use.

pataquets commented 9 years ago

Hi Ross. Check out #28

mnutt commented 9 years ago

Thanks! I've merged in #28 and made some changes to make it a bit easier to specify almost all doorman options from environment variables. I think this pull request could use conf.environment.js now. And maybe we could add the docker setup to README.md?

pataquets commented 9 years ago

As far as my Dockerfile (WIP) I'm still working on it. I'm getting the handle on the new configuration and features and will get in touch as soon as I make it work. If Ross doesn't beats me to it before :)

pataquets commented 9 years ago

Anyway, I'm +1 on documenting it, but only after we have a working version. As soon as we have a Dockerfile in the repo, we can set up a 'trusted build' in Docker Hub and deploy with just one command.

wololock commented 9 years ago

Hey guys, I added PR with Dockerfile I'm using in my dockerized environment (#31). You can build it with:

docker build -t doorman .

and run with docker run doorman or add it to your docker-compose.yml if you use docker-compose orchestration.

mnutt commented 9 years ago

I ended up merging in the very similar and slightly updated #35, but thanks!