Configuration¶
b3lb can be configured using environment variables or a .env file. The following settings are available:
SECRET_KEYThe secret key for your Django deployment.
REQUIRED
Warning
The secret key needs to be unique, secure and kept confidential. A key could be generated using the pwgen command:
pwgen -ys 50 1
DATABASE_URLThe databases setting for your Django deployment. The
defaultdatabase setting is used and should point to a PostgreSQL database.REQUIRED
CELERY_BROKER_URLThe broker URL used by Celery. The broker needs to be the same on all b3lb instances.
REQUIRED
CACHE_URLThe caches setting for your Django deployment. The
defaultcache is used by the worker nodes to cache BBB’sgetMeetingsXML data. It is recommended to use a redis backend.Default:
locmemcache://b3lb-default-cache
Hint
It is highly recommended to configure a powerful caching backend like redis. Running the worker nodes with limited caching will result in many database read requests with huge result sets. The worker nodes should use a shared cache if network throughput is non-expensive.
CACHEOPS_REDISThis settings needs to configure a redis backend used for ORM caching using django-cacheops. For frontend nodes it is recommend to use a local redis instance to separate failure domains.
Default:
redis://redis/2CACHEOPS_DEGRADE_ON_FAILUREThe ORM caching layer will continue to work with degraded performance if the redis backend is not available.
Default:
TrueLANGUAGE_CODEThe language ID to be used for the admin pages.
Default:
en-usTIME_ZONEThe time zone to be used.
Default:
UTCB3LB_API_BASE_DOMAINThe b3lb base domain.
REQUIRED
Hint
redis is used in the three different settings CACHES, CELERY_BROKER_URL and CACHEOPS_REDIS. It is highly recommended to use unique redis database identifiers for each setting.
Create your own .env file using the following template:
Hint
You might use the templates with Jinja2 and set the variables api_base_domain, db_passwd and
secret_key appropriately.
# Uvicorn: number of ASGI workers
WEB_CONCURRENCY=4
# Django Basics
SECRET_KEY={{ secret_key }}
DEBUG=False
# Django I18N
LANGUAGE_CODE=de-de
TIME_ZONE=Europe/Berlin
# Django Cache
CACHE_URL=redis://:{{ redis_secret }}@redis:6379/1
# Django ORM
DATABASE_URL=psql://b3lb-user:{{ db_passwd }}@db-host:5432/b3lb-db
# Django ORM Caching
CACHEOPS_REDIS=redis://:{{ redis_secret }}@redis:6379/2
# Configure Celery
CELERY_BROKER_URL=redis://:{{ redis_secret }}@redis:6379/3
# B3LB
B3LB_API_BASE_DOMAIN=api.bbbconf.de