Background
Application configuration can come in many flavours. At LemonEdge, being primarily a DotNetCore stack, we prefer to use appSettings and Environment Variables.
AppSettings
The first kind of app settings are those that you can configure when running programs locally. This is usually the appSettings.json that sits alongside the executable or DLL that is to be run.
See Configuration in ASP.NET Core | Microsoft Learn
Azure Settings
The second can be found against an application deployed into Azure, under the configuration section. These act like Environment variables to an azure or docker application.
See Configure apps - Azure App Service | Microsoft Learn
AWS Settings
We recommend our back-end services to be deployed in a ECS cluster. Create a task definition and provide the environment variables.
See Passing environment variables to a container - Amazon Elastic Container Service
Examples
The following illustrates the same configuration, in the 3 main methods described above.
AppSettings example
"LemonEdge" : {
"ServerAuthenticationSettings": {
"JWT": {
"ExpiryMinutes": 720,
"Secret": "hello"
}
}
}
Azure example
[
{
"name": "LemonEdge__ServerAuthenticationSettings__JWT__ExpiryMinutes",
"value": "720",
"slotSetting": false
},
{
"name": "LemonEdge__ServerAuthenticationSettings__JWT__Secret",
"value": "hello",
"slotSetting": false
}
]
AWS example
"environment": [
{
"name": "LemonEdge:ServerAuthenticationSettings:JWT:ExpiryMinutes",
"value": "720"
},
{
"name": "LemonEdge:ServerAuthenticationSettings:JWT:Secret",
"value": "hello"
}
]
Comments
Please sign in to leave a comment.