Skip to main content

Installation

info

Before deploying your Load Balancer, ensure you have configured your .env and workers.json files and reviewed the Deployment recommendations. Proper security setup is essential before exposing your service to any network.

Dependencies

  • Node.js (version 18 or higher)
  • npm or yarn
  • Redis
  • Docker (optional, for containerized deployment)

Manual Installation

  1. Clone the Load Balancer repository:

    git clone https://github.com/andera-top/load-balancer.git
    cd load-balancer
  2. Install dependencies:

    npm install
    # or
    yarn install
  3. Configure your .env by copying .env.example.

  4. Start the Load Balancer:

    npm run start
    # or
    yarn start

Docker Installation

  1. Clone the repository and navigate to the folder:

    git clone https://github.com/andera-top/load-balancer.git
    cd load-balancer
  2. Configure your .env by copying .env.example.

  3. Create a Docker network for Andera:

    docker network create andera-net
  4. Build and run the stack with Docker Compose:

    docker-compose build
    docker-compose up

    This will start both Redis and the Load Balancer, and automatically mount your local workers.json file into the container for live updates (hot-reload).

Do not use docker run directly. The recommended way is to use docker-compose up to ensure all dependencies and configuration are handled correctly.

You are now ready to route and manage tasks with the Andera Load Balancer.