Skip to content

On Azure

Vladislav Aleshaev edited this page Oct 12, 2026 · 1 revision

The live demo runs on Azure Container Apps. The runbook says how it is created, deployed, operated and removed: AzureBank on Azure Container Apps. This page is the short version.

The shape

  • One resource group in Italy North, created from one template that is run by hand.
  • One replica that scales between zero and one. It holds both hosts: the BFF, behind HTTPS, and the API, which listens on the loopback address only.
  • Why one replica: the BFF keeps its sessions in memory, so a shared session store has to come before a second replica. What it costs: a deployment that changes the app makes a new revision, which signs every visitor out.
  • The database is Azure SQL Database on the Basic tier.
  • A job runs every four hours. It deletes the demo copies whose time is over and keeps the pool of free copies filled.

No database password

The database server takes Microsoft Entra sign-ins only. The app and the jobs sign in as managed identities. No database password exists in any file, secret or parameter. The reasons, and the options that were rejected, are in ADR-0061.

How a commit is deployed

  1. A workflow, started by hand from main, builds the images of the commit and pushes them.
  2. A second run deploys them. It waits for a manual approval.
  3. It runs the database migration, moves the app to the new images and checks the address.
  4. If the check fails, the script tries to put the app back on the images it ran before; this has not yet been seen on a real failure. The schema is never put back.

The identity that deploys can change the app and its jobs and start a job. It cannot list a secret, stop or delete anything, or attach an identity. That is more than moving an image: whoever can change the app or a job can make it run any image, with the secrets in its environment and as the database identity attached to it. The runbook says so.

Guards

  • A Deny policy refuses any other shape, whoever asks: for example a second replica, or plain HTTP.
  • Three alert rules send a notice and stop nothing. One fired on 2026-10-07 and arrived by e-mail and as a phone notification.

Why the first page is slow

The app sleeps when nobody uses it. Measured from zero replicas, the first request answered after 27.0 s, and on another day after 24.6 s. The first sign-in after that took 6.0 s; on the awake app a sign-in took 0.6 s.

What it costs

The database is the one fixed cost: $0.161 a day, at the price read on 2026-10-02. Three days after the database was created it was the only cost on the bill.

What is not here

Nothing stops the app automatically: the alerts only notify. There is no Key Vault, no private endpoint and no rollback of the schema.

Clone this wiki locally