Public | Automated Build

Last pushed: 2 years ago
Short Description
Nginx LB configured by confd and monitored with NewRelic
Full Description

docker-nginx_lb

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
Docker Pull Command
Owner
mkaag
Source Repository

Comments (0)