Azure CLI Samples

The following table includes links to bash scripts built using the Azure CLI.

Create app
Create a web app and deploy files with FTP Creates an Azure web app and deploys a file to it using FTP.
Create a web app and deploy code from GitHub Creates an Azure web app and deploys code from a public GitHub repository.
Create a web app with continuous deployment from GitHub Creates an Azure web app with continuous publishing from a GitHub repository you own.
Create a web app and deploy code from a local Git repository Creates an Azure web app and configures code push from a local Git repository.
Create a web app and deploy code to a staging environment Creates an Azure web app with a deployment slot for staging code changes.
Create an ASP.NET Core web app in a Docker container Creates an Azure web app on Linux and loads a Docker image from Docker Hub.
Configure app
Map a custom domain to a web app Creates an Azure web app and maps a custom domain name to it.
Bind a custom SSL certificate to a web app Creates an Azure web app and binds the SSL certificate of a custom domain name to it.
Scale app
Scale a web app manually Creates an Azure web app and scales it across 2 instances.
Scale a web app worldwide with a high-availability architecture Creates two Azure web apps in two different geographical regions and makes them available through a single endpoint using Azure Traffic Manager.
Connect app to resources
Connect a web app to a SQL Database Creates an Azure web app and a SQL database, then adds the database connection string to the app settings.
Connect a web app to a storage account Creates an Azure web app and a storage account, then adds the storage connection string to the app settings.
Connect a web app to a redis cache Creates an Azure web app and a redis cache, then adds the redis connection details to the app settings.)
Connect a web app to Cosmos DB Creates an Azure web app and a Cosmos DB, then adds the Cosmos DB connection details to the app settings.
Back up and restore app
Back up a web app Creates an Azure web app and creates a one-time backup for it.
Create a scheduled backup for a web app Creates an Azure web app and creates a scheduled backup for it.
Restores a web app from a backup Restores an Azure web app from a backup.
Monitor app
Monitor a web app with web server logs Creates an Azure web app, enables logging for it, and downloads the logs to your local machine.