flowchart TB
  subgraph propre["Requested stop"]
    direction TB
    stop["docker stop"]
    r["Fast shutdown<br/>sessions cut"]
    c["Shutdown checkpoint<br/>written"]:::accent
    z["Exit code 0<br/>restart without recovery"]
  end
  subgraph brutal["Forced stop"]
    direction TB
    kill["docker kill"]
    k["Exit code 137<br/>no checkpoint written"]
    rec["Automatic recovery<br/>at restart"]:::accent
    f["Committed data<br/>kept"]
  end
  stop ==>|SIGINT| r
  r ==> c
  c ==> z
  kill ==>|SIGKILL| k
  k ==> rec
  rec ==> f
