CLI samples for Azure App Service
The following table includes links to bash scripts built using the Azure CLI.
| Script | Description |
|---|---|
| Create app | |
| Create an app and deploy files with FTP | Creates an App Service app and deploys a file to it using FTP. |
| Create an app and deploy code from GitHub | Creates an App Service app and deploys code from a public GitHub repository. |
| Create an app with continuous deployment from GitHub | Creates an App Service app with continuous publishing from a GitHub repository you own. |
| Create an app and deploy code from a local Git repository | Creates an App Service app and configures code push from a local Git repository. |
| Create an app and deploy code to a staging environment | Creates an App Service app with a deployment slot for staging code changes. |
| Create an ASP.NET Core app in a Docker container | Creates an App Service app on Linux and loads a Docker image from Docker Hub. |
| Create an app and expose it with a Private Endpoint | Creates an App Service app and a Private Endpoint |
| Configure app | |
| Map a custom domain to an app | Creates an App Service app and maps a custom domain name to it. |
| Bind a custom TLS/SSL certificate to an app | Creates an App Service app and binds the TLS/SSL certificate of a custom domain name to it. |
| Scale app | |
| Scale an app manually | Creates an App Service app and scales it across 2 instances. |
| Scale an app worldwide with a high-availability architecture | Creates two App Service apps in two different geographical regions and makes them available through a single endpoint using Azure Traffic Manager. |
| Protect app | |
| Integrate with Azure Application Gateway | Creates an App Service app and integrates it with Application Gateway using service endpoint and access restrictions. |
| Connect app to resources | |
| Connect an app to a SQL Database | Creates an App Service app and a database in Azure SQL Database, then adds the database connection string to the app settings. |
| Connect an app to a storage account | Creates an App Service app and a storage account, then adds the storage connection string to the app settings. |
| Connect an app to an Azure Cache for Redis | Creates an App Service app and an Azure Cache for Redis, then adds the redis connection details to the app settings.) |
| Connect an app to Cosmos DB | Creates an App Service app and a Cosmos DB, then adds the Cosmos DB connection details to the app settings. |
| Backup and restore app | |
| Backup an app | Creates an App Service app and creates a one-time backup for it. |
| Create a scheduled backup for an app | Creates an App Service app and creates a scheduled backup for it. |
| Restores an app from a backup | Restores an App Service app from a backup. |
| Monitor app | |
| Monitor an app with web server logs | Creates an App Service app, enables logging for it, and downloads the logs to your local machine. |