Skip to main content

Configuration

There are two basic ways to configure IronERP. There is the file or environment based application settings, and the database stored "runtime" settings.

The application settings are used to configure things like Database connection, logging, etc.

The runtime settings mainly configure the frontent behavior.

Application Configuration

There are multiple ways to set the application configuration. The backend will load files

  • appsettings.json
  • appsettings.<Environment>.json where Environment is Development, Production, etc.
  • appsettings.Local.json (useful for development, this file is included in .gitignore by default)

The files will be loaded in this order and values set multiple times will be overridden in this order. E.g. if a config key is set in appsettings.json and appsettings.Local.json, the value from appsettings.Local.json will be used.

Any value can also be overridden from Environment Variables. The variable should be the "path of sections" leading to the desired config key, separated by double underscore (__). For example, to override Logging:LogLevel:Default from this application.json:

{
"Logging": {
"LogLevel": {
"Default": "Information"
}
}
}

You would set a variable Logging__LogLevel__Default="Debug".

Configuration Reference

SectionKeyDescriptionDefault Value
Logging:LogLevelDefaultApplies to any namespaces that are not configured explicitlyInformation
Microsoft.AspNetCoreASPNetCore Framework LogsWarning
IronERPLogs from all IronERP coreInformation
<namespace> Overrides the log level for the given namecpace
<root>AllowedHostsSets which hosts the backend will accept connections under*
MongoDBHostThe MongoDB connection stringmongodb://localhost:27017
DatabaseThe name of your MongoDB databaseIronERP
Search.BackendMeilisearchHostURL of your Meilisearch instancehttp://localhost:7700
SearchKeyMeilisearch "Search" API key""
WriteKeyMeilisearch API key with Write permissions for indexing""
Search.IndexingStrategyIndexing strategy (options: full, none)full
JwtSecretA 32-character secret key for JWT signing""
IssuerJWT IssuerIronERP
AudienceJWT AudienceIronERP_Users
TokenExpirationMinutesHow long until the token expires (in minutes)60
EntraIDEnabledEnable Entra ID (formerly Azure ID) authenticationfalse
ClientIdEntra Client ID""
TenantIdEntra Tenant ID""
IssuerEntra Issuer (https://login.microsoftonline.com/{your-entra-tenant-id}/v2.0)""