Skip to content

4t1n/word-counter

Repository files navigation

Nginx Web Server and Load Balancer with Docker

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.

Prerequisites

  • Docker
  • Docker Compose

Project Structure

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

Getting Started

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.

word-counter

Phone

Screenshot 2023-06-10 at 14 00 12

Desktop

Screenshot 2023-06-10 at 14 01 10

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published