- Azure CLI: v2.75.0 (Ready)
- Docker: v27.3.1 (Ready)
- Azure Developer CLI: Installed (Restart Terminal Required)
After installing azd, you need to restart your terminal to update the PATH environment variable.
# Close this terminal and open a new PowerShell window, then verify:
azd version# Navigate to your project directory
cd "c:\Users\rodri\eShopOnWeb"
# Initialize azd for this project
azd init --template .
# Set your environment name
azd env new eshop-demo# Set the required environment variables
azd env set AZURE_LOCATION "eastus"
azd env set AZURE_PRINCIPAL_ID $(az ad signed-in-user show --query id -o tsv)# Deploy infrastructure and applications
azd up- Resource Group:
rg-eshop-demo - Container Registry: For your Docker images
- Container Apps Environment: With logging and monitoring
- Key Vault: For secure connection strings
- Log Analytics & Application Insights: For monitoring
- User-Assigned Managed Identity: For secure access
- Web MVC: Your eShop frontend
- Public API: Your eShop API backend
- SQL connection strings stored in Key Vault
- Managed Identity for ACR access
- CORS enabled for web traffic
If you prefer manual deployment, you can use Azure CLI:
# Create resource group
az group create --name "rg-eshop-demo" --location "eastus"
# Deploy Bicep template
az deployment group create \
--resource-group "rg-eshop-demo" \
--template-file "infra/main.bicep" \
--parameters "infra/main.parameters.json" \
--parameters environmentName="eshop-demo" \
--parameters location="eastus" \
--parameters principalId=$(az ad signed-in-user show --query id -o tsv)After deployment, update your container apps to use your built images:
# Get your container registry name
$acrName = az deployment group show --resource-group "rg-eshop-demo" --name "main" --query "properties.outputs.AZURE_CONTAINER_REGISTRY_NAME.value" -o tsv
# Update web MVC container app
az containerapp update \
--name "ca-webmvc-[unique-id]" \
--resource-group "rg-eshop-demo" \
--image "$acrName.azurecr.io/eshopwebmvc:latest"
# Update public API container app
az containerapp update \
--name "ca-publicapi-[unique-id]" \
--resource-group "rg-eshop-demo" \
--image "$acrName.azurecr.io/eshoppublicapi:latest"After deployment, you can:
- View logs in Application Insights
- Monitor performance in Azure Portal
- Access your applications via the provided URLs
- Restart your terminal completely
- Or manually add to PATH:
$env:PATH += ";C:\Program Files\Azure Dev CLI\bin"
- Check Azure CLI is logged in:
az account show - Verify permissions in your subscription
- Check the deployment logs in Azure Portal
When deployment completes successfully:
- ✅ Resource group created with all resources
- ✅ Container apps running and accessible
- ✅ Database connections working
- ✅ Applications available at public URLs
Your eShopOnWeb application will be running on Azure Container Apps with secure database connections! 🚀