Skip to content

Loadbalance between two App with HAproxy And Nginx (Gitlab CI-CD)

Notifications You must be signed in to change notification settings

SoroushImanian/Long-way

Repository files navigation

Long Way

Loadbalance between two App with HAproxy And Nginx (Gitlab CI-CD)

How it works?

Pay attention to the image below

Long way

Environment Variables

To run this project, you will need to add the following environment variables to your Gitlab Project Environment :

NEXUS_USER --> "admin"

NEXUS_PASSWD --> "admin"

NEXUS_REGISTRY --> "YOUR_Nexus_Server_Host:5000"

Run The Project Manually

⚠️ If you want to run this project manually, Follow this commands:

Install dependencies

Before running the project, we need to install Docker and Docker Compose

1. Installing Docker

Download the convenience script for the latest release of Docker CE on Linux from get.docker.com

  curl -fsSL https://get.docker.com -o get-docker.sh
  sh get-docker.sh

After this script finishes running, I always run a test docker command just to see if it’s working or not.

  docker --version

The last step:

  sudo usermod -aG docker $USER
  sudo systemctl enable docker

2. Installing Docker Compose

First, confirm the latest version available in their releases page. At the time of this writing, the most current stable version is 2.10.2.

Use the following command to download:

  mkdir -p ~/.docker/cli-plugins/
  curl -SL https://github.com/docker/compose/releases/download/v2.10.2/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose

Next, set the correct permissions so that the docker compose command is executable:

  chmod +x ~/.docker/cli-plugins/docker-compose

To verify that the installation was successful, you can run:

  docker compose version

Run Project

Clone the project

  git clone https://github.com/SoroushImanian/Long-way.git

Go to the project directory

  cd Long-way

Run Project :

  docker-compose -f docker-compose-manual.yaml up -d

About

Loadbalance between two App with HAproxy And Nginx (Gitlab CI-CD)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published