Public Repository

Last pushed: 2 years ago
Short Description
nginx-proxy
Full Description

##Usage:

####1. Run nginx-proxy:

$ docker run --name nginx-proxy -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock --restart=always brycekottke/nginx-proxy

####2. Start a container you want to be used behind the proxy:
$ docker run --name app1 -e VIRTUAL_HOST=<EIP_OR_DNS> -d --restart=always brycekottke/app1:latest
$ docker run --name app2 -e VIRTUAL_HOST=<EIP_OR_DNS> -d --restart=always brycekottke/app2:latest

####3. Navigate to EIP / DNS Hostname and watch it load balance the traffic between app1 and app2 containers.

####SSL:
$ docker run --name nginx-proxy -d -p 80:80 -p 443:443 -v /app/certs:/etc/nginx/certs -v /var/run/docker.sock:/tmp/docker.sock --restart=always brycekottke/nginx-proxy

Make sure .crt and .key exist in /home/core/certs on your docker instance and are named accordingly to the <EIP_OR_DNS> section above.
example: foo.bar.com.key

Docker Pull Command
Owner
brycekottke

Comments (0)