Wait until Garage is up by polling port 3900

This commit is contained in:
Nicolas Jeannerod 2024-09-10 12:41:53 +00:00
parent 9346bcca3d
commit 2dca2caca3

View file

@ -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)