Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
Orchard Core supports a hierarchy of Configuration Sources
The Startup ASP.NET Core Project, e.g. OrchardCore.Cms.Web.csproj, appsettings.json, or by environment appsettings.Development.json.
Global Tenant Configuration App_Data/appsettings.json, or by environment App_Data/appsettings.Development.json.
Individual Tenant Configuration files located under each Tenant Folder in the App_Data/Sites/{tenant_name}/appsettings.json folder. Note: These are mutable files, and do not support an Environment version.
Environment Variables, or AppSettings as Environment Variables via Azure.
The Configuration Sources are loaded in the above order, and settings lower in the hierarchy will override values configured higher up, i.e. an Global Tenant value will always be overridden by an Environment Variable.
Then in the bottom it states:
By default an Orchard Core site will use CreateDefaultBuilder in the Startup Project's Program.cs which will load IConfiguration in the following order
Startup project appsettings.json
Startup project appsettings.{environment}.json
User Secrets (if environment is Development)
Environment Variables
Command Line Args
IShellConfiguration will then add these 1. App_Data/appsettings.json 2. App_Data/Sites/{tenant_name}/appsettings.json for the particular tenant
Which I find confusing since the two sections don't agree on the precedence between environment variables and tenant configurations.
Discussed in https://github.com/OrchardCMS/OrchardCore/discussions/11955
Documentation states:
Then in the bottom it states:
Which I find confusing since the two sections don't agree on the precedence between environment variables and tenant configurations.