From 031f5e4e3a81bc7165d4bdcc9a0b13945208346c Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Fri, 26 Aug 2016 23:05:34 -0400 Subject: [PATCH] Only wait for a single port --- config | 1 + functions | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config b/config index 1997cb6..198986e 100644 --- a/config +++ b/config @@ -6,6 +6,7 @@ export POSTGRES_ROOT=${POSTGRES_ROOT:="/var/lib/dokku/services/postgres"} export PLUGIN_COMMAND_PREFIX="postgres" export PLUGIN_DATA_ROOT=$POSTGRES_ROOT export PLUGIN_DATASTORE_PORTS=(5432) +export PLUGIN_DATASTORE_WAIT_PORT=5432 export PLUGIN_DEFAULT_ALIAS="DATABASE" export PLUGIN_ALT_ALIAS="DOKKU_POSTGRES" export PLUGIN_IMAGE=$POSTGRES_IMAGE diff --git a/functions b/functions index e0fbc6a..c7c3a17 100755 --- a/functions +++ b/functions @@ -393,7 +393,7 @@ service_create_container() { echo "$ID" > "$SERVICE_ROOT/ID" dokku_log_verbose_quiet "Waiting for container to be ready" - docker run --rm --link "$SERVICE_NAME:$PLUGIN_COMMAND_PREFIX" dokkupaas/wait > /dev/null + docker run --rm --link "$SERVICE_NAME:$PLUGIN_COMMAND_PREFIX" dokkupaas/wait -p "$PLUGIN_DATASTORE_WAIT_PORT" > /dev/null dokku_log_verbose_quiet "Creating container database" DATABASE_NAME="$(get_database_name "$SERVICE")"