Skip to content

Instantly share code, notes, and snippets.

@sjwaight
Last active April 18, 2019 04:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sjwaight/a105617a766717fda831df70373d92c0 to your computer and use it in GitHub Desktop.
Save sjwaight/a105617a766717fda831df70373d92c0 to your computer and use it in GitHub Desktop.
Create a new Python Web App running on App Services running Linux.
#!/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