title | description | services | author | ms.service | ms.topic | ms.date | ms.author | ms.custom |
---|---|---|---|---|---|---|---|---|
include file |
include file |
app-service |
cephalin |
app-service |
include |
02/02/2018 |
cephalin |
include file |
Create a web app in the myAppServicePlan
App Service plan.
In the Cloud Shell, you can use the az webapp create
command. In the following example, replace <app_name>
with a globally unique app name (valid characters are a-z
, 0-9
, and -
). The runtime is set to dotnetcore|2.0
. To see all supported runtimes, run az webapp list-runtimes --linux
.
# Bash
az webapp create --resource-group myResourceGroup --plan myAppServicePlan --name <app_name> --runtime "dotnetcore|2.0" --deployment-local-git
# PowerShell
az --% webapp create --resource-group myResourceGroup --plan myAppServicePlan --name <app_name> --runtime "dotnetcore|2.0" --deployment-local-git
When the web app has been created, the Azure CLI shows output similar to the following example:
Local git is configured with url of 'https://<username>@<app_name>.scm.azurewebsites.net/<app_name>.git'
{
"availabilityState": "Normal",
"clientAffinityEnabled": true,
"clientCertEnabled": false,
"cloningInfo": null,
"containerSize": 0,
"dailyMemoryTimeQuota": 0,
"defaultHostName": "<app_name>.azurewebsites.net",
"deploymentLocalGitUrl": "https://<username>@<app_name>.scm.azurewebsites.net/<app_name>.git",
"enabled": true,
< JSON data removed for brevity. >
}
You’ve created an empty web app in a Linux container, with git deployment enabled.
Note
The URL of the Git remote is shown in the deploymentLocalGitUrl
property, with the format https://<username>@<app_name>.scm.azurewebsites.net/<app_name>.git
. Save this URL as you need it later.