Skip to content

Environment Variables

Since Didact Engine is a build once, deploy anywhere application, you are intended to take the prebuilt binaries, use them as is, and modify their behavior only through the use of runtime environment variables.

Enginesettings.json

Namely, whatever root directory you run Didact Engine's executable file inside of, you need to add a special environment variable file called enginesettings.json. This file is quite similar to appsettings.json but is intended for you to set runtime environment variables as needed.

Separation of concerns

These runtime environment variables are for Didact Engine only. Didact UI has its own runtime environment variables.

The full template for enginesettings.json is shown below:

json
{
    "Database": {
        "Provider": "SQLServer",
        "ConnectionString": "<YOUR_CONNECTION_STRING_HERE>"
    },
    "EngineApiKey": "<YOUR_RANDOM_API_KEY_HERE>",
    "LicenseKey": "<YOUR_LICENSE_KEY_HERE>",
    "Directive": "Leader",
    "EngineTuningName": "Default",
}

However, feel free to read each field's corresponding doc section for more details.

Database.Provider

DescriptorValue
KeyDatabase.Provider
Typestring
DescriptionDidact's database provider key.
Requiredtrue
DefaultSQLServer

The database provider names are shown below:

Provider NameProvider KeyStatus
SQL ServerSQLServerSupported
Azure SQL DatabaseSQLServerSupported
PostgreSQLPostgreSQLPlanned

Database.ConnectionString

DescriptorValue
KeyDatabase.ConnectionString
Typestring
DescriptionDidact's database connection string.
Requiredtrue
DefaultN/A

EngineApiKey

DescriptorValue
KeyEngineApiKey
Typestring
DescriptionThe API key that you generate to protect Didact Engine with authentication.
Requiredfalse
DefaultN/A

Danger close

Please be aware that if you omit this setting, your instance of Didact Engine will not have authentication.

LicenseKey

DescriptorValue
KeyLicenseKey
Typestring
DescriptionThe license key for your Didact paid plan.
Requiredtrue for customers only
DefaultN/A

For customers only

If you are not a Didact customer / only use the Community Edition, you can omit this field. If you are a Didact customer, make sure to include this license key or else your enhanced features may not be unlocked.

Directive

DescriptorValue
KeyDirective
Typestring
DescriptionThe Directive for Didact Engine.
Requiredfalse
DefaultLeader

The Directives are shown below:

Name
Leader
Worker

EngineTuningName

DescriptorValue
KeyEngineTuningName
Typestring
DescriptionThe name of the Engine Tuning for Didact Engine.
Requiredfalse
DefaultDefault

Proudly powered by VitePress