Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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