Azure Webapp:堆栈设置 [英] Azure webapp: Stack settings

查看:71
本文介绍了Azure Webapp:堆栈设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以通过门户设置Web应用程序的堆栈:

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

我通过ARM模板部署基础结构:

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')]"
        }
      ]
    }
  }
}

部署到此的代码是.NET Core 2.2应用程序.我看不到可以在其中设置堆栈设置的任何地方: https://docs.microsoft.com/zh-cn/azure/templates/microsoft.web/2018-11-01/sites ,但是当我部署.NET Core代码时,一切正常.什么是堆栈设置"?为什么不能通过ARM进行设置?我什至需要设置吗?我可以想象运行时可以猜测它是一个.NET Core应用程序,然后使其自动运行.

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.

推荐答案

堆栈设置用于设置您要使用哪种语言及其版本.App Service支持六种语言堆栈:ASP.NET Core Node.js PHP Python Java Ruby.如果在Windows上创建,则在门户网站(.NET .NET Core PHP Python Java)上可以选择5个堆栈.如果选择linux,则门户上可以选择7个堆栈(Ruby Node PHP .NET Core Java8 Java11 Python).

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).

您似乎在Windows操作系统上创建了应用程序服务,因此在最初创建Web应用程序后,就不再需要确定该应用程序是.NET Core应用程序,因为.NET Core位已安装在基础工人.您可以查看以下官方文档了解有关Azure App Service配置的更多信息.

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.

这篇关于Azure Webapp:堆栈设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆