Deploy a web app from GitHub, configure environment variables, use deployment slots for staging, and add a custom domain.
# Create an App Service Plan (the VM running your app)
az appservice plan create \
--name myapp-plan --resource-group myapp-rg \
--sku B1 --is-linux
# Create the web app
az webapp create \
--resource-group myapp-rg --plan myapp-plan \
--name my-unique-app-name \
--runtime 'NODE:20-lts'
# Deploy from GitHub
az webapp deployment source config \
--name my-unique-app-name --resource-group myapp-rg \
--repo-url https://github.com/you/your-repo \
--branch main --manual-integration# Set app settings (environment variables)
az webapp config appsettings set \
--resource-group myapp-rg --name my-unique-app-name \
--settings \
DATABASE_URL='...' \
API_KEY='...' \
NODE_ENV='production'# Create a staging slot
az webapp deployment slot create \
--name my-unique-app-name --resource-group myapp-rg \
--slot staging
# Deploy to staging first
az webapp deployment source config \
--name my-unique-app-name --resource-group myapp-rg \
--slot staging --repo-url ... --branch main
# Swap staging to production (zero-downtime)
az webapp deployment slot swap \
--name my-unique-app-name --resource-group myapp-rg \
--slot staging --target-slot productionaz webapp config appsettings set. Never hardcode secrets.B1 plan is the smallest paid tier ($13/mo). Free tier (F1) has limited CPU — fine for dev.