After this lesson, you will be able to: Deploy a web app to Azure App Service with deployment slots (staging/production), scaling, custom domains, and SSL.
App Service is Azure's flagship PaaS. The 'just give me a URL with auto-TLS' service. Most Azure web workloads start here.
Supports: .NET, Java, Node, Python, PHP, Ruby, custom containers. Deploy from: git push, zip upload, GitHub Actions, Azure DevOps, container registry. Built-in: SSL, custom domains, autoscaling, deployment slots, easy auth, application insights. App Service Plan is the underlying compute (think 'shared VM'). Multiple apps can share one plan to save cost.
az CLI in 4 commands.
# 1. Create resource groupaz group create -n rg-myapp -l eastus# 2. Create App Service Plan (the VM pool)az appservice plan create -n plan-myapp -g rg-myapp --sku B1 --is-linux# 3. Create the web appaz webapp create -n myapp-yourname -g rg-myapp --plan plan-myapp --runtime 'NODE:20-lts'# 4. Deploy from local gitaz webapp deployment source config-local-git -n myapp-yourname -g rg-myappgit remote add azure <git-url-from-previous-command>git push azure main# Now myapp-yourname.azurewebsites.net is live.# Alternative: deploy a Docker imageaz webapp create -n myapp-yourname -g rg-myapp --plan plan-myapp \--deployment-container-image-name ghcr.io/me/myapp:1.0
Production app at myapp.azurewebsites.net. Add a 'staging' slot = staging.myapp.azurewebsites.net. Deploy new code to staging; smoke test on the public URL. Swap: staging ↔ production. Atomic, instant cutover. If it breaks, swap back. Each slot has its own settings (env vars, connection strings), you mark which settings 'stick to slot' and which 'swap with code'. Equivalent of AWS blue/green built into the service. Free on Standard tier and up.
Vertical (scale up): change the App Service Plan SKU. Bigger VMs. Horizontal (scale out): more instances. Manual count or autoscale rules. Autoscale: based on CPU / memory / queue depth / custom metric. Set min and max. Premium plans: more instances, faster, more memory, better networking. Consumption plan: pay only for what runs (Functions-style); good for spiky workloads.
Default URL: <appname>.azurewebsites.net. Custom domain: add a TXT record to verify ownership; add A or CNAME records. SSL: free via App Service Managed Certificate (auto-renewing); custom certs via Key Vault. Force HTTPS: turn on in TLS / SSL settings. Default is allow HTTP.
Running 1 app on a Premium plan when 10 apps could share a Basic plan. App Service Plan is the cost; apps are free. Storing connection strings in app code. Use App Service Configuration (encrypted) or Key Vault references. Skipping deployment slots. Every prod deploy without a slot swap is a risk. No Application Insights. APM is one toggle away; turn it on. Mounting Storage Account credentials manually when Managed Identity works.
Pick the senior pattern.
Sign in and purchase access to unlock this lesson.