From 1f0905d353f08552d9194b1174d0817df8046304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Guitaut?= Date: Wed, 9 Sep 2015 19:26:23 +0200 Subject: [PATCH] Use aanand/wait image to wait for service to be ready --- commands | 2 +- install | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/commands b/commands index 4ec762c..2b713cf 100755 --- a/commands +++ b/commands @@ -35,7 +35,7 @@ case "$1" in echo "$ID" > "$SERVICE_ROOT/ID" dokku_log_verbose_quiet "Waiting for container to be ready" - sleep 10 + docker run --rm --link "$SERVICE_NAME:$PLUGIN_COMMAND_PREFIX" aanand/wait > /dev/null dokku_log_info2 "$PLUGIN_SERVICE container created: $SERVICE" dokku "$PLUGIN_COMMAND_PREFIX:info" "$SERVICE" diff --git a/install b/install index a32d3b8..51c0387 100755 --- a/install +++ b/install @@ -7,6 +7,7 @@ if ! docker images | grep -e "^$PLUGIN_IMAGE " | grep -q "$PLUGIN_IMAGE_VERSION" fi docker pull svendowideit/ambassador:latest +docker pull aanand/wait:latest mkdir -p "$PLUGIN_DATA_ROOT" || echo "Failed to create $PLUGIN_SERVICE directory" chown dokku:dokku "$PLUGIN_DATA_ROOT"