Deploy & Update Apps
Standard Deployment Flow
Every service follows the same 3-step flow:
Code change → Build & push image to ACR → Update Container App
Step 1: Build and push the image
With local Docker running:
# Log in to ACR
az acr login --name ca45076245feacr
# Build and tag
docker build -t ca45076245feacr.azurecr.io/my-service:$(git rev-parse --short HEAD) .
# Push
docker push ca45076245feacr.azurecr.io/my-service:$(git rev-parse --short HEAD)
Without local Docker (recommended — cloud build):
az acr build \
--registry ca45076245feacr \
--resource-group testing \
--image my-service:$(git rev-parse --short HEAD) \
.
Step 2: Update the Container App
az containerapp update \
--name my-service \
--resource-group testing \
--image ca45076245feacr.azurecr.io/my-service:$(git rev-parse --short HEAD)
Step 3: Verify
# Check the running revision
az containerapp show \
--name my-service \
--resource-group testing \
--query 'properties.template.containers[0].image' \
-o tsv
# Check health
curl https://my-service.icydesert-76825898.southindia.azurecontainerapps.io/health
Service-Specific Commands
Marketing Site (agentstacktech.com)
az acr build --registry ca45076245feacr --resource-group testing \
--image agentstack-marketing:latest .
az containerapp update --name agentatacktechmarketing \
--resource-group assistant-agent-rg \
--image ca45076245feacr.azurecr.io/agentstack-marketing:latest
HITL Frontend
TAG=$(git rev-parse HEAD)
az acr build --registry ca45076245feacr --resource-group testing \
--image hitl-frontend:$TAG .
az containerapp update --name hitl-frontend --resource-group testing \
--image ca45076245feacr.azurecr.io/hitl-frontend:$TAG
Assistant Agent
TAG=$(date +%Y%m%d%H%M%S)
az acr build --registry ca74e243f29aacr --resource-group assistant-agent-rg \
--image assistant-agent:$TAG .
az containerapp update --name assistant-agent --resource-group assistant-agent-rg \
--image ca74e243f29aacr.azurecr.io/assistant-agent:$TAG
Keycloak
az acr build --registry ca45076245feacr --resource-group testing \
--image keycloak:26.0-agentstack-$(git rev-parse --short HEAD) .
az containerapp update --name keycloak --resource-group testing \
--image ca45076245feacr.azurecr.io/keycloak:26.0-agentstack-$(git rev-parse --short HEAD)
Rolling Back
# Find previous image tags
az acr repository show-tags \
--name ca45076245feacr \
--repository hitl-frontend \
--orderby time_desc \
--output table
# Roll back to a specific tag
az containerapp update \
--name hitl-frontend \
--resource-group testing \
--image ca45076245feacr.azurecr.io/hitl-frontend:<previous-tag>
Environment Variables & Secrets
To add or update an env var:
# Plain env var
az containerapp update \
--name my-service \
--resource-group testing \
--set-env-vars "MY_VAR=my-value"
# Secret env var (store secret first, then reference it)
az containerapp secret set \
--name my-service \
--resource-group testing \
--secrets "MY_SECRET=secret-value"
az containerapp update \
--name my-service \
--resource-group testing \
--set-env-vars "MY_VAR=secretref:MY_SECRET"
Scaling
az containerapp update \
--name my-service \
--resource-group testing \
--min-replicas 1 \
--max-replicas 5