Configure BRIX AI environment variables

Before installing BRIX AI, specify the required values in the environment variables file:

  1. Go to the downloaded BRIX AI installation files.
  2. Open the folder that corresponds to your installation method: docker-compose or docker-swarm.
  3. Select the .env file.
  4. Configure the following parameters:

The parameters you set are applied during BRIX AI installation. If you change their values later, apply them using a script.

Project name

If you need to run multiple isolated copies of BRIX AI on a single host, assign a unique project name to each instance. They are used as follows:

  • When using Docker Compose: as the value for the COMPOSE_PROJECT_NAME parameter and as a container prefix.
  • When using Docker Swarm: as a prefix for service names.

The default value is elma-cortex. You can specify a custom project name in two ways:

  1. In the .env environment variables file.

This method is convenient if a separate installation directory is created for each instance of BRIX AI and scripts are executed from that directory. When using this method:

  • Change the value of the PROJECT_NAME variable to specify the project name.
  • Run installation, diagnostic, and uninstallation scripts without passing the project name. The value will be retrieved automatically from the .env file.
  1. When running a script.

This method allows you to explicitly pass the required project name every time you execute installation, diagnostic, or uninstallation scripts. When using this method:

  • Pass the project name using the --project-name flag during the initial run of the installation script. For details, see articles on installing BRIX AI.
  • Specify the project name in the --project-name parameter every time you execute scripts to update, diagnose, or remove BRIX AI.

BRIX AI server address

Fill in the following variables:

  • ELMA_CORTEX_HOSTNAME: Host name of your server.
  • ELMA_CORTEX_PORT: HTTPS port. Port 443 is used by default.

TLS settings

Set the TLS certificate management mode and configure usage parameters based on your certificate authority.

For details, see Configure TLS certificates for BRIX AI.

Authorization

By default, users are automatically logged in as an administrator upon opening BRIX AI. To enhance security, configure sign-in via BRIX or ELMA Bot.

For details, see Configure authorization in BRIX AI.

Use of external services

Services required for operation, such as MongoDB, Redis, RabbitMQ, and others, are bundled with BRIX AI.

You can disable the installation of built-in services if they are already configured in your infrastructure. To do this, set the corresponding service variable to false in the .env file:

CADDY_ENABLED=false
REDIS_ENABLED=false
MONGO_ENABLED=false
RABBIT_ENABLED=false
MINIO_ENABLED=false
QDRANT_ENABLED=false
PHOENIX_ENABLED=false

After that, configure the connection between BRIX AI and external services by uncommenting the relevant variables. The required connection settings depend on the specific service.

Performance settings

To increase system throughput, you can configure scaling for BRIX AI as workload increases.

начало внимание

Resource scaling under increased workload is available only in specific BRIX AI editions.

конец внимание

To manage scaling, configure the following parameters in the .env file:

  • Number of HTTP server workers. Usually equals the number of CPU cores. Default is 4:

UVICORN_WORKERS=8

  • Number of workers for background tasks. Default is 4:

CELERY_WORKER_CONCURRENCY=8

  • Enabling autoscaling for worker pools. An advanced setting that allows defining the CELERY_WORKER_CONCURRENCY parameter separately for specific worker pools:

CELERY_START_WORKER_MAIN=--autoscale=2,4 -Q celery.gamma.tasks.ingestion,celery.gamma.tasks.search.run,celery.gamma.tasks.agent.run
CELERY_START_WORKER_FAST=--autoscale=4,8 -Q celery.gamma.tasks.search.run,celery.gamma.tasks.agent.run

Apply new environment variable values

Configured settings are automatically applied during BRIX AI installation.

If you update parameters in the .env file after installation, run the following command to apply them:

./install.sh