Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lfittl/nginx-lb
Etcd/confd based nginx load balancer container
https://github.com/lfittl/nginx-lb
Last synced: 21 days ago
JSON representation
Etcd/confd based nginx load balancer container
- Host: GitHub
- URL: https://github.com/lfittl/nginx-lb
- Owner: lfittl
- Created: 2015-02-23T09:08:28.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-10-28T09:10:57.000Z (about 9 years ago)
- Last Synced: 2024-12-03T04:04:51.230Z (23 days ago)
- Language: Shell
- Homepage: https://registry.hub.docker.com/u/lfittl/nginx-lb/
- Size: 152 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## nginx load balancer
This is an example docker image of how to use etcd + nginx as a dynamic load balancer.
It uses the `/lb` namespace and allows you to setup multiple hosts with optional SSL support.
(better documentation soon)
### Running on CoreOS
```
etcdctl set /lb/staging/hostname staging.example.com
etcdctl set /lb/staging/ssl myexamplecert
etcdctl set /lb/staging/upstreams/app1 app1:5000docker run -d --name nginx-lb -p 80:80 -p 443:443 -v /data/ssl:/etc/nginx/ssl lfittl/nginx-lb
```### Running on OSX (boot2docker)
```
docker run -d --name etcd -p 4001:4001 -p 8001:8001 quay.io/coreos/etcd -addr `boot2docker ip`:4001 -peer-addr `boot2docker ip`:8001 -name etcd-node1export ETCDCTL_PEERS=`boot2docker ip`:4001
etcdctl set /lb/staging/hostname staging.example.com
etcdctl set /lb/staging/ssl myexamplecert
etcdctl set /lb/staging/upstreams/app1 `boot2docker ip`:5000docker build -t lfittl/nginx-lb .
docker run -d --name nginx -p 80:80 -p 443:443 -v /Users/myuser/myssl:/etc/nginx/ssl -e HOST_IP=`boot2docker ip` lfittl/nginx-lb
docker logs -f nginx
docker exec -it nginx cat /etc/nginx/conf.d/app.conf
```### Authors
* [Lukas Fittl](https://github.com/lfittl)