recipes/docker-nginx-loadbalancer
Docker + Nginx
Load balancing with Docker and Nginx.
Features
- Docker and Nginx : Deploy in docker using 5 replicas and load balancer with Nginx
- Logger: The application includes a request logger for monitoring HTTP requests.
Endpoints
| Name | Rute | Parameters | State | Protected | Method |
|---|---|---|---|---|---|
| Hello | /hello | No | Completed | No | GET |
Getting Started
To get a local copy up and running, follow these steps:
- Clone the repository to your local machine.
- Navigate to the project directory.
- Build the Docker image with docker compose
- Run the Docker compose composition
docker compose up --build The Dockerfile starts with FROM --platform=$BUILDPLATFORM, which needs BuildKit, the default builder of Docker Engine 23 and later and of Docker Desktop. With an older Docker Engine set DOCKER_BUILDKIT=1, and with docker-compose v1 also COMPOSE_DOCKER_CLI_BUILD=1.
5. Access the application at http://localhost:8080/hello.