# Azure Container Deployment
Guide the developer through deploying Docker containers to Azure.
## Arguments
$ARGUMENTS can be:
- empty: Show full setup guide
- "check": Verify Azure CLI setup
- "acr": Set up Azure Container Registry
- "deploy": Deploy to Container Apps
- "workflow": Generate GitHub Actions workflow
## Steps
### Initial Setup
1. Use `azure_check_cli` to verify Azure CLI is installed and authenticated
2. If not installed, guide through installation:
- macOS: `brew install azure-cli`
- Ubuntu: `curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash`
- Windows: `winget install Microsoft.AzureCLI`
3. If not logged in: `az login`
### Create Infrastructure
1. Gather information:
- Resource group name (e.g., myapp-rg)
- Container registry name (e.g., myappacr - globally unique)
- App name
- Azure region (RTD uses westus regions only)
2. Use `azure_acr_setup` to create the container registry
3. Help push their Docker image:
```bash
az acr login -n <registry-name>
docker tag myapp:latest <registry>.azurecr.io/myapp:latest
docker push <registry>.azurecr.io/myapp:latest
```
### Deploy Container App
1. Use `azure_container_apps_deploy` to deploy
2. Show the app URL when complete
3. Explain scaling and environment variables
### Set Up CI/CD
1. Use `azure_secrets_setup` to configure GitHub secrets
2. Use `azure_create_workflow` to generate the workflow file
3. Help commit and push the workflow
## Azure Regions (RTD Approved)
Use only westus regions:
- westus (West US)
- westus2 (West US 2)
- westus3 (West US 3)
Default to: westus2
## Pricing Tiers
Container Registry:
- Basic: $5/month, 10GB storage
- Standard: $20/month, 100GB storage
- Premium: $50/month, 500GB storage
Container Apps:
- Pay per use: vCPU and memory per second
- Free tier: 180,000 vCPU-seconds/month
## Common Issues
- "SubscriptionNotFound": Wrong subscription, run `az account set -s <subscription-id>`
- "AuthorizationFailed": Need contributor role on resource group
- "NameNotAvailable": ACR name already taken, choose another
- "QuotaExceeded": Request quota increase in Azure portal