Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure webapp: Stack settings

I can set my stack for a webapp through the portal: Stack settings through the portal

I deploy my infra through an ARM template:

 "apiVersion": "2015-08-01",
  "type": "Microsoft.Web/sites",
  "name": "[variables('name')]",
  "location": "[parameters('location')]",
  "dependsOn": [
    "[concat(parameters('customer'),'-','webapp-small','-' , 'plan','-',parameters('env'))]"
  ],
  "properties": {
    "clientAffinityEnabled": false,
    "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', concat(parameters('customer'),'-','webapp-small','-' , 'plan','-',parameters('env')))]",
    "siteConfig": {
      "alwaysOn": "[parameters('webAppAlwaysOn')]",
      "use32BitWorkerProcess": true,
      "connectionStrings": [
      ],
      "appSettings": [
        {
          "name": "WEBSITE_LOAD_CERTIFICATES",
          "value": "[reference(variables('name')).thumbprint]"
        },
        {
          "name": "WEBSITE_RUN_FROM_PACKAGE",
          "value": 0
        },
        {
          "name": "WEBSITE_ADD_SITENAME_BINDINGS_IN_APPHOST_CONFIG",
          "value": 1
        },
        {
          "name": "ASPNETCORE_ENVIRONMENT",
          "value": "[parameters('AspNetCoreEnvironment')]"
        },
        {
          "name": "EnvironmentOptions:ResourceGroupPostfix",
          "value": "[parameters('env')]"
        },
        {
          "name": "APPINSIGHTS_INSTRUMENTATIONKEY",
          "value": "[reference(variables('aiWebName')).InstrumentationKey]"
        },
        {
          "name": "IpWhiteList",
          "value": "[parameters('whitelist')]"
        }
      ]
    }
  }
}

The code deployed to this is a .NET Core 2.2 app. I can't see any place where i can set the stack settings: https://docs.microsoft.com/en-us/azure/templates/microsoft.web/2018-11-01/sites, but when i deploy the .NET Core code, everything works. What is the "Stack settings" for? Why can't I set it through ARM? Do I even need to set it? I imagine that the runtime can guess that it is a .NET Core application and then make it work automatically.

like image 526
mslot Avatar asked Oct 15 '19 10:10

mslot


People also ask

How do I choose runtime stack in Azure app?

Login to the Azure portal and traverse to the web app. Go to Configuration and then you would find the framework details under General Settings. Click and choose the relevant runtime you want.

How do I change my Azure Web config?

If you want to change web. config files you can use the Azure portal, there is a tool called "App Service Editor" in preview or Kudu that lets you edit any of the files you've deployed.


1 Answers

Stack settings is to set what kind of language and the version of it that you want to use.App Service support six kind of language stacks: ASP.NET Core Node.js PHP Python Java Ruby. If you create on windows, there are 5 stacks can selected on portal(.NET .NET Core PHP Python Java). If you choose linux, there are 7 stacks can selected on portal(Ruby Node PHP .NET Core Java8 Java11 Python).

It looks like you create a app service on windows OS, so after initial web app creation, there isn’t a need to identify that an app is a .NET Core app anymore because the .NET Core bits are already installed on the underlying worker. You can have a look of this Offical doc to learn more about Azure App Service Configuration.

like image 176
Cindy Pau Avatar answered Sep 20 '22 21:09

Cindy Pau