我想使用PowerShell創建Azure Flask,就像我們如何在PowerShell中創建Web App一樣(請參閱下文)。有沒有任何命令可以做到這一點。使用PowerShell創建Azure Flask
新AzureRmWebApp -ResourceGroupName $ WebAppResourceGroupName雜牌 $ WebAppName -Location $ WebAppLocation -AppServicePlan $ WebAppServicePlanName
我想使用PowerShell創建Azure Flask,就像我們如何在PowerShell中創建Web App一樣(請參閱下文)。有沒有任何命令可以做到這一點。使用PowerShell創建Azure Flask
新AzureRmWebApp -ResourceGroupName $ WebAppResourceGroupName雜牌 $ WebAppName -Location $ WebAppLocation -AppServicePlan $ WebAppServicePlanName
下面是一個ARM模板部署瓶應用:
{
"parameters": {
"name": {
"type": "string"
},
"hostingPlanName": {
"type": "string"
},
"location": {
"type": "string"
},
"hostingEnvironment": {
"type": "string"
},
"serverFarmResourceGroup": {
"type": "string"
},
"subscriptionId": {
"type": "string"
}
},
"resources": [
{
"name": "[parameters('name')]",
"type": "Microsoft.Web/sites",
"properties": {
"siteConfig": {
"appSettings": []
},
"name": "[parameters('name')]",
"serverFarmId": "[concat('/subscriptions/', parameters('subscriptionId'),'/resourcegroups/', parameters('serverFarmResourceGroup'), '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]",
"hostingEnvironment": "[parameters('hostingEnvironment')]"
},
"resources": [
{
"apiVersion": "2016-03-01",
"name": "web",
"type": "sourcecontrols",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('name'))]"
],
"properties": {
"RepoUrl": "https://github.com/azureappserviceoss/FlaskAzure",
"branch": "master",
"IsManualIntegration": true
}
}
],
"apiVersion": "2016-03-01",
"location": "[parameters('location')]",
"tags": {
"[concat('hidden-related:', '/subscriptions/', parameters('subscriptionId'),'/resourcegroups/', parameters('serverFarmResourceGroup'), '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "empty"
}
}
],
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
"contentVersion": "1.0.0.0"
}
你將其存儲在一個文件或一個網址,並與New-AzureRMResourceGroupDeployment
我能夠成功地創建Web應用程序。但是當我瀏覽web應用程序時,我錯誤 –
運行時錯誤 描述:服務器上發生應用程序錯誤。此應用程序的當前自定義錯誤設置可防止遠程查看應用程序錯誤的詳細信息。但是,它可以通過本地服務器上運行的瀏覽器來查看。 詳細信息:要使此特定錯誤消息的詳細信息可以在遠程計算機上查看,請在位於當前Web應用程序根目錄中的「web.config」配置文件中創建
沒有具體的命令,但我相信你可以用Powershell做到這一點,也可以用ARM模板做到這一點 – 4c74356b41
你能提供任何示例 –