This repo shows an example of typical architecture of proxy + load balancing with apache web server and tomcat made with docker-compose.
Clone the repo and cd inside
docker-compose up -d
docker-compose ps
It will show the active containers
curl http://localhost/examples
will show that tomcat is responding
docker-compose stop
will stop all containersdocker-compose start
will start the containers againdocker-compose down
will stop and remove all containers (with flag--rmi all
also it will delete images).
You must use environment variables to the config files for the load balancer works succesfully