Run the whole platform yourself

GARBATI runs locally with one command. Clone every service repo as a sibling of garbati-platform (same parent directory):

some-parent-directory/
  garbati-platform/     <- this repo
  LedgerApi/
  Garbati.IdentityApi/
  Garbati.OrchestratorApi/
  Garbati.StaffIdentityApi/
  Garbati.OpsApi/

Then, from garbati-platform/:

docker compose up --build

This builds all five services’ images, starts five PostgreSQL databases, runs each service’s EF Core migrations automatically, then starts all five APIs wired to call each other over the compose network — no manual API-key setup, no localhost port juggling. First build takes a while (five separate .NET builds); subsequent runs reuse the cached images.

What's below

The rest of this page mirrors DEPLOYMENT-RUNBOOK.md from the repository root — the same, exact runbook used to take real services from “built and tested” to “actually running” on Azure, not a separate, simplified version written for this site. It’s kept in sync automatically by .github/workflows/docs-sync.yml on every push that changes the real file, not hand-copied — see that workflow and scripts/sync_docs.py for why a GitHub Action does this instead of a plain Jekyll tag (Jekyll’s own include/include_relative tags refuse any path containing .., so neither can reach a file one directory above docs/ directly). Prefer reading the real file itself? It’s directly on GitHub.

Deploying a GARBATI service to Azure

D-27 (G11, from research/oss-core-banking-readiness-gaps.md): the exact, repeatable sequence used to take Garbati.StaffIdentityApi, Garbati.OpsApi and Garbati.ProductApi from “built and tested” to “actually running” (T-048, 27 Oct 2026) — written down so the next service doesn’t need this reconstructed from memory or chat history. Deliberately not Infrastructure-as-Code (Terraform/Bicep/ Pulumi) — the owner’s decision: a plain runbook now, real IaC once the remaining services (ScheduleApi, financing services, Channel/Gateway) are built. See “When to actually move to IaC” at the end.

What’s shared across every service (set up once, not per-service)

All six services deployed so far share:

Do not provision a new server or plan for a new service without a real reason (a genuine resource contention problem, not just “it feels cleaner”). Adding a service to this pattern is just one more database and one more site on infrastructure that already exists.

Per-service steps, in order

Assume $APP_NAME (e.g. garbati-scheduleapi), $DB_NAME (lowercase, no dashes, e.g. scheduleapi), $CONN_STRING_NAME (the exact name the service’s own ConnectionStrings section expects, e.g. ScheduleDb), and $REPO (e.g. Garbati.ScheduleApi) below.

1. Create the database

az postgres flexible-server db create --resource-group ledger-rg --server-name ledgerapi-db-san --name "$DB_NAME"

2. Create the App Service

az webapp create --resource-group ledger-rg --plan ASP-ledgerrg-8f31 --name "$APP_NAME" --runtime "DOTNETCORE:8.0"

Verify the runtime actually took (az webapp config show --name "$APP_NAME" --resource-group ledger-rg --query linuxFxVersion -o tsv should print DOTNETCORE|8.0) — it has silently shown blank before.

3. Set the connection string

az webapp config connection-string set --name "$APP_NAME" --resource-group ledger-rg --connection-string-type Custom \
  --settings "$CONN_STRING_NAME=Host=ledgerapi-db-san.postgres.database.azure.com;Port=5432;Database=$DB_NAME;Username=ledgerapidb;Password=<the shared admin password>;SSL Mode=VerifyFull"

4. Create the Azure AD app registration + service principal for GitHub OIDC

az ad app create --display-name "$APP_NAME-deploy"              # note the appId returned
az ad sp create --id "<appId>"

5. Add the federated credential — read this before guessing the subject format

The subject is NOT repo:OWNER/REPO:ref:refs/heads/main. GitHub’s real OIDC subject claim includes immutable numeric account and repo IDs, appended with @. Get them first:

gh api user --jq '.id'                          # account id, same for every repo under this account
gh api repos/AbubakarImam/$REPO --jq '.id'       # this specific repo's id

Then:

{
  "name": "github-main-deploy",
  "issuer": "https://token.actions.githubusercontent.com",
  "subject": "repo:AbubakarImam@<account id>/<REPO>@<repo id>:ref:refs/heads/main",
  "audiences": ["api://AzureADTokenExchange"]
}
az ad app federated-credential create --id "<appId>" --parameters federated-credential.json

Getting this wrong surfaces as AADSTS700213 on the first deploy attempt, with the actual expected subject printed in the error — if you do guess wrong, that error message is the fastest way to the real value, faster than re-deriving it from gh api first.

6. Grant the role assignment — this step needs the owner, not the agent

az role assignment create --assignee "<appId>" --role "Contributor" --scope=/subscriptions/<subscription id>/resourceGroups/ledger-rg

Granting management-plane Azure access to a new identity is blocked for the agent by this session’s own permission classifier, correctly. The owner runs this one directly (prefix with ! in the Claude Code prompt to execute in their own session).

7. Set the three GitHub secrets

gh secret set AZUREAPPSERVICE_CLIENTID_<SERVICE> --repo AbubakarImam/$REPO --body "<appId>"
gh secret set AZUREAPPSERVICE_TENANTID_<SERVICE> --repo AbubakarImam/$REPO --body "<tenant id>"
gh secret set AZUREAPPSERVICE_SUBSCRIPTIONID_<SERVICE> --repo AbubakarImam/$REPO --body "<subscription id>"

8. Author (or verify) the deploy job in ci.yml

Copy the exact shape already used by every sibling’s deploy job (needs: [test, docker], publish → zip → migration bundle → azure/login → read the connection string from the App Service itself (never duplicate it into GitHub) → open/close a scoped Postgres firewall rule → apply migrations → zip-deploy → smoke test both /health/ready and an unauthenticated request to a real protected route). Don’t improvise a different shape — read a sibling’s actual .github/workflows/ci.yml directly and mirror it.

9. Provision real (non-dev) API keys for every genuine cross-service call

For each service this one actually calls, or that actually calls this one in production:

10. Trigger the deploy and verify independently

gh workflow run ci.yml --repo AbubakarImam/$REPO --ref main   # or just `git push`, either triggers it
gh run watch <run-id> --repo AbubakarImam/$REPO --exit-status

Then verify yourself, separately from the deploy job’s own smoke test:

curl -s -o /dev/null -w "%{http_code}\n" "https://$APP_NAME.azurewebsites.net/health/ready"   # expect 200
curl -s -o /dev/null -w "%{http_code}\n" "https://$APP_NAME.azurewebsites.net/<a real protected route>"  # expect 401

Known gotchas, confirmed directly against real behaviour

When to actually move to Infrastructure-as-Code

Owner’s decision, 27 Oct 2026 (D-27): not now. Revisit once the remaining never-started services (ScheduleApi, financing services, Channel/Gateway) are actually built and this runbook has been run a few more times — by then there will be more resources to manage, more repeatable pain to justify the tooling investment, and a clearer picture of what a Terraform/Bicep module for this platform actually needs to express, rather than guessing at its shape now from six resources.