Skip to content

denizyoldas/load-balancer-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nginx Load Balancer Example

This is a simple example of how to use the nginx-proxy

Usage

App 1

docker build -t app1 .
docker run --name app1 -dp 5001:5000 app1

App 2

docker build -t app2 .
docker run --name app2 -dp 5002:5000 app2

Nginx Proxy

 docker run --name nginx -dp 8082:80 load_balancer_nginx

Test

while true; do curl http://localhost:8082 && sleep 2 && echo ""; done;