All Articles
How-toยท5 min read

Deploy a Web App to Azure App Service in 10 Minutes

App Service runs your web app on managed infrastructure with HTTPS, scaling, and slots built in. Here is the full path from code to a live URL.

Part of: Microsoft Azure Cloud Engineer

Azure App Service is the fastest way to get a web app running on Azure without managing servers. It handles TLS, scaling, and deployment slots for you. Here is the whole path from local code to a live, production-shaped URL.

Step 1: Create the App Service Plan and App

An App Service plan defines the compute your app runs on; the web app runs on top of it. Create both:

az appservice plan create \ --name my-plan --resource-group my-rg \ --sku B1 --is-linux az webapp create \ --name my-web-app --resource-group my-rg \ --plan my-plan --runtime "NODE:20-lts"

Step 2: Deploy Your Code

Deploy straight from a local build with zip deploy, or wire up continuous deployment from GitHub. The zip path is fastest to start:

az webapp deploy \ --name my-web-app --resource-group my-rg \ --src-path build.zip --type zip

Within a minute your app is live at https://my-web-app.azurewebsites.net with HTTPS already configured.

Step 3: Configure Settings and Secrets

App settings become environment variables in your app. Keep secrets in Key Vault and reference them rather than pasting raw values:

az webapp config appsettings set \ --name my-web-app --resource-group my-rg \ --settings NODE_ENV=production \ "DB_CONN=@Microsoft.KeyVault(SecretUri=https://myvault.vault.azure.net/secrets/db-conn/)"

Step 4: Use a Deployment Slot for Zero-Downtime Releases

Slots let you deploy to a staging copy, warm it up, and swap it into production instantly โ€” with an immediate rollback if something's wrong:

az webapp deployment slot create \ --name my-web-app --resource-group my-rg --slot staging # Deploy to staging, verify, then swap az webapp deployment slot swap \ --name my-web-app --resource-group my-rg --slot staging

Summary

App Service turns a web app into a managed, HTTPS-secured service in minutes: create a plan and web app, deploy your code with zip deploy or GitHub CI, push config through app settings with secrets in Key Vault, and use deployment slots to release with zero downtime and instant rollback. No servers to patch, no TLS to configure โ€” just your app on infrastructure Azure runs for you.

#Azure#App Service#Deployment#PaaS

Want to go deeper?

Microsoft Azure Cloud Engineer

View Course