diff --git a/garage.nix b/garage.nix index bd2c38ed..b58738d7 100644 --- a/garage.nix +++ b/garage.nix @@ -172,8 +172,10 @@ in { path = [ cfg.package pkgs.perl pkgs.awscli ]; script = '' set -xeuo pipefail - # give garage time to start up - sleep 10 + + # Give garage time to start up by waiting until somethings speaks HTTP + # behind localhost:3900. + until curl -sio /dev/null http://localhost:3900/; do sleep 1; done # XXX: this is very sensitive to being a single instance # (doing the bare minimum to get garage up and running)