role
and env
is used in order to allow a rule-based configuration. This allow you to set configuration specific for given role or for given environment without a need to deploying different files to every separate Sitecore role or environment.
Full documentation can be found here: https://doc.sitecore.com/xp/en/developers/103/platform-administration-and-architecture/use-a-rule-based-configuration.html
- For the
role:require
attribute you should use one (or more) of Sitecore roles which are:
- ContentDelivery
- ContentManagement
- Processing
- Reporting
- Standalone
In theory the setting will allow any other texts but I cannot think of any real live use case when you may need it.
More about roles can be found here: https://doc.sitecore.com/xp/en/developers/103/platform-administration-and-architecture/define-the-server-role.html
Those 2 setting means that if in web:config
there will be setting:
sourceFolder
variable will be set to D:\project\src
. And if there will be any of dev
, qa
or prod
in web.config
, value of the variable will be set to /App_Data/unicorn
.
More to be read here: https://doc.sitecore.com/xp/en/developers/103/platform-administration-and-architecture/add-a-custom-rule-to-your-configuration.html