diff --git a/plugin.sh b/plugin.sh index 63eb9b2..0a970ca 100755 --- a/plugin.sh +++ b/plugin.sh @@ -26,10 +26,16 @@ run_stack_deploy() { stack deploy -c "$PLUGIN_COMPOSE" "$PLUGIN_STACK" } +run_stack_wait() { + export DOCKER_HOST="ssh://$PLUGIN_USER@$PLUGIN_HOST:$PLUGIN_PORT" + docker run --rm vitalets/docker-stack-wait-deploy | sed 's/True/true/' | bash -x /dev/stdin "$PLUGIN_STACK" +} + run_plugin() { echo "--- start deployment ---" load_deploy_key run_stack_deploy + run_stack_wait echo "--- end deployment ---" }