mkaag / docker-nginx_lb

Nginx LB configured by confd and monitored with NewRelic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker-nginx_lb

Docker Hub

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

Base Docker Image

Installation

docker build -t mkaag/nginx_lb github.com/mkaag/docker-nginx_lb

Usage

Basic usage

docker run -d -p 443:443 -p 80:80 \
mkaag/nginx_lb /sbin/my_init -- bash /usr/local/bin/confd-watch

Using persistent volume

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

Using NewRelic

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

etcd structure

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

About

Nginx LB configured by confd and monitored with NewRelic

License:MIT License


Languages

Language:Nginx 50.3%Language:Shell 49.7%