Skip to main content
All configuration is managed through environment variables. Copy the sample file to get started:
cp contrib/.env.sample .env
Edit .env in the project root before starting services. When running with Docker Compose, variables are loaded automatically via the env_file directive in docker-compose.yml.

Django settings

VariableTypeDescription
ENVIRONMENTstrRuntime environment label, e.g. development or production.
LOG_LEVELstrGunicorn log level, e.g. debug, info, warning.
WEB_TIMEOUTintGunicorn worker timeout in seconds. Workers silent longer than this are killed and restarted.
WEB_WORKERSintNumber of Gunicorn worker processes.
SECRET_KEYstrDjango secret key. Set a long random string in production.
ALLOWED_HOSTSstrDjango allowed hosts. Use * for development; restrict to your domain in production.
USE_X_FORWARDED_HOSTboolWhether to use the X-Forwarded-Host header. Useful behind a reverse proxy.
CACHE_BACKENDstrDjango cache backend, e.g. django.core.cache.backends.memcached.MemcachedCache.
CACHE_LOCATIONstrDjango cache location, e.g. localhost:11211.
SECURE_PROXY_SSL_HEADERstrDjango secure proxy SSL header. Provide as a comma-separated pair, e.g. HTTP_X_FORWARDED_PROTO,https.
Example defaults (from contrib/.env.sample):
ENVIRONMENT=development
LOG_LEVEL=debug
WEB_TIMEOUT=60
WEB_WORKERS=2
SECRET_KEY=my-secret
ALLOWED_HOSTS=*
USE_X_FORWARDED_HOST=False
CACHE_BACKEND=django.core.cache.backends.memcached.MemcachedCache
CACHE_LOCATION=localhost:11211
Always replace SECRET_KEY with a strong, unique value before deploying to production.

Database

VariableTypeDescription
DATABASE_URLstrDatabase URL for the Django application. Must be PostgreSQL — Jarbas uses JSONField, which requires PostgreSQL.
Example:
DATABASE_URL=postgres://jarbas:mysecretpassword@postgres/jarbas
When running with Docker Compose, also set POSTGRES_USER, POSTGRES_PASSWORD, and POSTGRES_DB to match your DATABASE_URL credentials:
POSTGRES_USER=jarbas
POSTGRES_PASSWORD=mysecretpassword
POSTGRES_DB=jarbas

Message broker

VariableTypeDescription
CELERY_BROKER_URLstrCelery-compatible message broker URL. RabbitMQ is the default broker used by the project.
Example:
CELERY_BROKER_URL=amqp://guest:guest@queue/

Twitter settings

Used by the tweets management command to fetch Twitter engagement data for reimbursements.
VariableTypeDescription
TWITTER_CONSUMER_KEYstrTwitter API key.
TWITTER_CONSUMER_SECRETstrTwitter API secret.
TWITTER_ACCESS_TOKENstrTwitter access token.
TWITTER_ACCESS_SECRETstrTwitter access token secret.
Follow the python-twitter getting started guide to obtain these credentials from the Twitter Developer Portal.
Example:
TWITTER_CONSUMER_KEY=
TWITTER_CONSUMER_SECRET=
TWITTER_ACCESS_TOKEN=
TWITTER_ACCESS_SECRET=

Google settings

VariableTypeDescription
GOOGLE_ANALYTICSstrGoogle Analytics tracking ID, e.g. UA-123456-7. Leave empty to disable tracking.
GOOGLE_STREET_VIEW_API_KEYstrGoogle Street View Image API key, used to display street-level photos for supplier locations.
Example:
GOOGLE_ANALYTICS=
GOOGLE_STREET_VIEW_API_KEY=

Production settings

These variables are only required when deploying Jarbas with HTTPS termination via Let’s Encrypt.
VariableTypeDescription
VIRTUAL_HOST_WEBstrHostname used for the HTTPS certificate, e.g. jarbas.serenata.ai. When testing production settings locally, add this hostname to /etc/hosts.
LETSENCRYPT_EMAILstrEmail address used to register the HTTPS certificate with Let’s Encrypt.
HTTPS_METHODstrSet to noredirect to disable the automatic HTTP → HTTPS redirect. Defaults to redirect.
Example:
VIRTUAL_HOST_WEB=jarbas.serenata.ai
LETSENCRYPT_EMAIL[email protected]
HTTPS_METHOD=redirect

Searchvector schedule

Jarbas can rebuild its full-text search index on a recurring schedule using Celery Beat. The schedule is defined with standard cron notation.
VariableTypeDescription
SCHEDULE_SEARCHVECTORboolSet to True to enable scheduled searchvector rebuilds.
SCHEDULE_SEARCHVECTOR_CRON_MINUTEstrCron minute field, e.g. 0.
SCHEDULE_SEARCHVECTOR_CRON_HOURstrCron hour field, e.g. 2.
SCHEDULE_SEARCHVECTOR_CRON_DAY_OF_WEEKstrCron day-of-week field, e.g. * for every day.
SCHEDULE_SEARCHVECTOR_CRON_DAY_OF_MONTHstrCron day-of-month field, e.g. */2 for every other day.
SCHEDULE_SEARCHVECTOR_CRON_MONTH_OF_YEARstrCron month-of-year field, e.g. * for every month.
Example (rebuild at 02:00 every other day):
SCHEDULE_SEARCHVECTOR=True
SCHEDULE_SEARCHVECTOR_CRON_MINUTE=0
SCHEDULE_SEARCHVECTOR_CRON_HOUR=2
SCHEDULE_SEARCHVECTOR_CRON_DAY_OF_WEEK=*
SCHEDULE_SEARCHVECTOR_CRON_DAY_OF_MONTH=*/2
SCHEDULE_SEARCHVECTOR_CRON_MONTH_OF_YEAR=*
You can also trigger a one-off searchvector rebuild manually at any time:
docker-compose run --rm django python manage.py searchvector

New Relic (optional)

Jarbas ships with New Relic APM integration. These variables are optional and only needed if you have a New Relic account.
VariableTypeDescription
NEW_RELIC_APP_NAMEstrApplication name shown in the New Relic UI, e.g. Jarbas.
NEW_RELIC_ENVIRONMENTstrDeployment environment label, e.g. Production.
NEW_RELIC_LICENSE_KEYstrNew Relic account license key.
NEW_RELIC_DEVELOPER_MODEstrSet to true to enable developer mode (no data sent to New Relic).
Example:
NEW_RELIC_APP_NAME=Jarbas
NEW_RELIC_ENVIRONMENT=development
NEW_RELIC_LICENSE_KEY=
NEW_RELIC_DEVELOPER_MODE=true

Build docs developers (and LLMs) love