From 7842b5aeba93ab59eeae7f3771da4a0f327f6c72 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 25 Jul 2026 12:44:20 +0200 Subject: [PATCH] Add readiness probe to devenv --- devenv.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/devenv.nix b/devenv.nix index a63f4c5..34cd8e6 100644 --- a/devenv.nix +++ b/devenv.nix @@ -85,9 +85,16 @@ in ''; # Waits for postgres's own readiness probe (pg_isready + SELECT 1), not just process start. 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 = { torad = cargoNix.workspaceMembers.torad.build; + tora = cargoNix.workspaceMembers.tora.build; }; }