This repository contains the Dockerfile and the configuration files to build a Load Balancer based on Nginx for Docker. The configuration is performed with confd and monitoring can be enabled to use NewRelic
- phusion/baseimage, the minimal Ubuntu base image modified for Docker-friendliness...
- ...including image's enhancement from Paul Querna
docker build -t mkaag/nginx_lb github.com/mkaag/docker-nginx_lb
docker run -d -p 443:443 -p 80:80 \
mkaag/nginx_lb /sbin/my_init -- bash /usr/local/bin/confd-watch
docker run -d \
-v /opt/apps/public:/var/www \
-p 443:443 -p 80:80 \
mkaag/nginx_lb /sbin/my_init -- bash /usr/local/bin/confd-watch
docker run -d \
-e "NEWRELIC_LICENSE=your_license" \
-e "NEWRELIC_APP=domain.com" \
-p 443:443 -p 80:80 \
mkaag/nginx_lb /sbin/my_init -- bash /usr/local/bin/confd-watch
etcdctl set /services/production/domain domain.com
etcdctl set /services/production/root /opt/apps/public
etcdctl set /services/production/upstream/127.0.0.1 127.0.0.1:9001