Add readiness probe to devenv

This commit is contained in:
Alexander
2026-07-25 12:44:20 +02:00
parent 3f3a6d354a
commit 7842b5aeba
+7
View File
@@ -85,9 +85,16 @@ in
''; '';
# Waits for postgres's own readiness probe (pg_isready + SELECT 1), not just process start. # Waits for postgres's own readiness probe (pg_isready + SELECT 1), not just process start.
after = [ "devenv:processes:postgres" ]; after = [ "devenv:processes:postgres" ];
# torad speaks gRPC over a Unix socket and does not register reflection,
# so grpcurl would need proto files. Instead use the `tora health` CLI
# (already knows the proto, reads TORAD_SOCKET env), which exits 0 iff
# torad reports SERVING. torad's poll_db_health flips the status to
# NotServing when postgres ping fails, so this also gates on a live DB.
ready.exec = "${config.outputs.tora}/bin/tora health";
}; };
outputs = { outputs = {
torad = cargoNix.workspaceMembers.torad.build; torad = cargoNix.workspaceMembers.torad.build;
tora = cargoNix.workspaceMembers.tora.build;
}; };
} }