App Settings Conversion

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.

mceclip0.png

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.

mceclip1.png

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.

 

mceclip0.png

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"
  }
]
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.