This project demonstrates a basic setup of Nginx web servers and a load balancer using Docker and Docker Compose. The load balancer distributes incoming traffic to two Nginx web servers. This setup is configured using Docker Compose, which allows all three services to be started with a single command.
- Docker
- Docker Compose
nginx.conf.webserver: Nginx configuration for the web servers
nginx.conf.loadbalancer: Nginx configuration for the load balancer
Dockerfile.webserver: Dockerfile for building the web server Docker image
Dockerfile.loadbalancer: Dockerfile for building the load balancing Docker image
docker-compose.yml: Docker Compose file for starting the application
index.html, js/, css/: Static content for the web servers
To start the application, run the following command in the root directory of the project:
docker-compose up
After the application starts, you can access the web application through a browser by navigating to:
http://localhost:80
This will load balance the requests between the two Nginx web servers running on Docker.
To stop the application, run the following command in the root directory of the project:
docker-compose down
This will stop all running services defined in docker-compose.yml.