Update docs for VIRTUAL_PORT

This commit is contained in:
Jason Wilder 2014-05-20 09:39:08 -06:00
parent 592ed499d7
commit 5caec4895e

View file

@ -2,6 +2,8 @@ nginx-proxy sets up a container running nginx and [docker-gen][1]. docker-gen g
See [Automated Nginx Reverse Proxy for Docker][2] for why you might want to use this. See [Automated Nginx Reverse Proxy for Docker][2] for why you might want to use this.
### Usage
To run it: To run it:
$ docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock -t jwilder/nginx-proxy $ docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock -t jwilder/nginx-proxy
@ -39,6 +41,9 @@ Provided your DNS is setup to forward foo.bar.com to the a host running nginx-pr
CMD ["/usr/bin/supervisord"] CMD ["/usr/bin/supervisord"]
### Multiple Ports
If your container exposes multiple ports, nginx-proxy will default to the service running on port 80. If you need to specify a different port, you can set a VIRTUAL_PORT env var to select a different one. If your container only exposes one port and it has a VIRTUAL_HOST env var set, that port will be selected.
[1]: https://github.com/jwilder/docker-gen [1]: https://github.com/jwilder/docker-gen
[2]: http://jasonwilder.com/blog/2014/03/25/automated-nginx-reverse-proxy-for-docker/ [2]: http://jasonwilder.com/blog/2014/03/25/automated-nginx-reverse-proxy-for-docker/