Azure Container Apps Notes

Azure Container Apps (ACA) is the Azure no-K8s path, a serverless host over the same image. On AKS, use the Helm chart. This page covers the ACA-specific glue: ingress path split, secrets, the migration one-off, and Flexible Server.

Image registry

Mirror to Azure Container Registry (ACR) for in-region pulls; ACA can also pull from Docker Hub directly.

az acr login --name <your-acr>
docker pull simchasolutions/db-studio:1.0.1
docker tag simchasolutions/db-studio:1.0.1 <your-acr>.azurecr.io/simcha-db-studio:1.0.1
docker push <your-acr>.azurecr.io/simcha-db-studio:1.0.1

Container app essentials

Migrations on ACA

ACA has no native initContainer/pre-deploy hook, so gate the schema change with a one-off Azure Container Instance (ACI) on the same image, command overridden to the runner, before promoting the new revision. Set MIGRATE_ON_BOOT=false on the ACA app so the ACI is the single owner.

# Run migrations as a one-off ACI, overriding the command
az container create \\
  --resource-group <rg> --name dbstudio-migrate \\
  --image <your-acr>.azurecr.io/simcha-db-studio:1.0.1 \\
  --restart-policy Never \\
  --command-line "node dist/server/database/migrate.js" \\
  --environment-variables DB_DEVOPS_DB_HOST=<pg-host> ... \\
  --secure-environment-variables DB_DEVOPS_DB_PASSWORD=<pwd> ...

# Wait for completion, then deploy the new revision to ACA
az container wait --resource-group <rg> --name dbstudio-migrate --condition Terminated

Azure Database for Postgres

Updating the container app

# Push the new image tag
docker push <your-acr>.azurecr.io/simcha-db-studio:1.0.2

# Run the migration ACI (see above)

# Promote a new revision in ACA
az containerapp update \\
  --name simcha-db-studio --resource-group <rg> \\
  --image <your-acr>.azurecr.io/simcha-db-studio:1.0.2

ACA's revision-based deploys give you instant rollback if a release misbehaves.

Other Azure paths