This page is for whoever is on call for a Docker Compose deployment of TRUSTIVAN. It assumes the operator scripts in infra/scripts/ and the monitoring profile (Observability). Every command runs from the repository checkout on the host, against one stack:

1. Detect

An incident starts with one of three signals: Confirm what is firing, rather than what one person saw:

2. Triage

Answer three questions in order, because the order decides the fix.
  1. Did a deploy just happen? If the incident began within minutes of deploy.sh, assume the release until shown otherwise and go to step 3. deploy.sh printed the previous images; they are also in the shell history.
  2. What is not running? $C ps shows each service’s state. Restarting means it starts and exits: $C logs --tail 50 <service> names the reason.
  3. Is it a dependency? /ready names the database and the cache. PostgreSQL down stops the API; Redis down only slows scans (the worker polls PostgreSQL instead) and does not need a rollback. A full disk on the worker fails scans with “the scanning worker ran out of disk space”: free space, and they are retried.

3. Roll back a release

rollback.sh puts the previous images back and leaves the schema alone. Use the exact command deploy.sh printed: at the end of a successful deploy (to roll back: infra/scripts/rollback.sh --to-backend '…' --to-dashboard '…') or at the gate that stopped it (Roll back with: infra/scripts/rollback.sh --to-backend '…').
If the previous image fails against the current schema, the release carried a migration that was not backward-compatible. Code rollback cannot fix that: restore the backup deploy.sh took before migrating (*-pre-deploy.dump.age in BACKUP_DIR) with infra/scripts/restore.sh, as Backup and recovery describes.

4. Verify, then close

Write down the timeline (first signal, decision, rollback, recovery) while it is fresh. The rehearsal below is the shape to follow.

Rehearsal, 2026-11-11

Run on a local stack built from this repository: the production Compose file, PostgreSQL, Redis, the API and the worker on a locally built backend image, three organizations, and the monitoring profile on. The “bad release” was the same image with an API that exits at start with a configuration error. Four minutes from the bad start to a serving API, most of it the health gate’s wait. What the rehearsal did not cover: a real paging receiver (the example Alertmanager file was used, so the alert reached nobody), the smoke test (no public URL), and a release whose migration forces a restore.