Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Orchard environmental settings discussion #825
Gathering some thoughts on how Orchard2 deals with environmental settings in conjunction with a multi-environment release flow.
We work with the notion "code flows up, content flows down", meaning that code changes flow from
The reason for this is to be able to code and test against real-world data, of course with the relevant obfuscation of sensitive data stored in the db, including user account data.
In a Perfect World
All environment-related settings, assets and configuration are in App_Data (e.g. Settings.txt), Web.config or, more recently, appsettings.json. Only "portable", environment-agnostic content is stored in "the database".
This means that no data transformations are required to restore from Production to Test or Development.
In the Real World
Environment-related settings do find their way into the db, especially where settings relate to hosts. In Orchard1 a good example is the SecureSocketsLayer module (Secure Host and Insecure Host) and site settings such as UseCdn. In Orchard2 a good example is the OpenId module (Authority, App Redirect URL's, etc.).
This means that flowing the CMS content from Production to downlevel environments is somewhat more complex as these settings need to be updated to match each environment.
I just a PR #826
What this will allow you to do is register your own... IShellSettingsConfigurationProvider at the application services level.
This allows you to pull in configuration values from anywhere and get them pushed to the Dictionary in ShellSettings, including environmental configuration. maybe this could help
Just for infos and as a reminder, in the distributed branch i needed to fix some race conditions in our
And looking at this aspnet pr saying
I will start working on