Last active
April 18, 2019 04:49
-
-
Save sjwaight/a105617a766717fda831df70373d92c0 to your computer and use it in GitHub Desktop.
Create a new Python Web App running on App Services running Linux.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Based on: https://docs.microsoft.com/en-us/azure/app-service/scripts/cli-linux-docker-aspnetcore#sample-script | |
# Variables | |
appName=$1 | |
appPlanName="${appName}plan" | |
resGroupName=$2 | |
location="WestUS2" | |
# Create a Resource Group | |
az group create --name $resGroupName --location $location | |
# Create an App Service Plan | |
az appservice plan create --name $appPlanName --resource-group $resGroupName --location $location --is-linux --sku B1 | |
# Create a Web App | |
az webapp create --name $appName --plan $appPlanName --resource-group $resGroupName --runtime "python|3.6" | |
# Copy the result of the following command into a browser to see the web app. | |
echo http://$appName.azurewebsites.net |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment