Bragi Docs Help

Hosting Infrastructure

Bragi offers flexible deployment options to suit a variety of IT environments. There are two primary routes for hosting the Bragi WebApp and the Bragi Schedulers:

Configuring a Deployment

Every Bragi component reads its settings from the same sources, applied in order. Later sources win:

  1. appsettings.json

  2. appsettings.{Environment}.json, where {Environment} is the name set by DOTNET_ENVIRONMENT for the Scheduler running as a Windows Service, or by ASPNETCORE_ENVIRONMENT for the WebApp and the Scheduler Web API

  3. Environment variables

  4. Command-line arguments

Overriding Settings With Environment Variables

Any setting can be supplied as an environment variable by joining the configuration path with a double underscore. This is the usual way to configure a containerised deployment, where the settings files are baked into the image:

ConnectionStrings__BragiMetaData=Server=my-sql.database.windows.net;Initial Catalog=bragi-meta;... BragiConfig__Email__Host=smtp.example.com

An environment variable overrides the same setting in the files, so an image built with development defaults can be pointed at a production database without rebuilding it.

Choosing Which Environments a Scheduler Runs

A Scheduler starts a worker for every environment code it is given. Codes can be supplied either singly or as a list:

BragiConfig__EnvironmentCode=Production BragiConfig__EnvironmentCodes__0=Production BragiConfig__EnvironmentCodes__1=Reporting

Setting either of these as an environment variable replaces the codes in the settings files rather than adding to them. This matters for containers: the image bakes in whatever codes its appsettings.json shipped with, and without replacement a Scheduler deployed to production would keep starting workers for the development and test environments as well, running their scheduled jobs.

02 October 2026