Use config_export function instead of calling dokku as a subcommand

This commit is contained in:
Jose Diaz-Gonzalez
2015-08-30 01:55:14 -04:00
parent cddc4afcea
commit e7c035e207
8 changed files with 40 additions and 21 deletions

View File

@@ -36,6 +36,7 @@
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_PATH/common/functions"
source "$PLUGIN_PATH/config/functions"
APP="$1"; DOKKU_APP_CONTAINER_ID="$2"; DOKKU_APP_CONTAINER_TYPE="$3"; DOKKU_APP_LISTEN_PORT="$4"; DOKKU_APP_LISTEN_IP="$5"
if [[ -z "$DOKKU_APP_LISTEN_PORT" ]] && [[ -f "$DOKKU_ROOT/$APP/PORT" ]]; then
@@ -51,8 +52,8 @@ fi
# source global and in-app envs to get DOKKU_CHECKS_WAIT and any other necessary vars
eval "$(dokku config --global $APP --export)"
eval "$(dokku config $APP --export)"
eval "$(config_export global)"
eval "$(config_export app $APP)"
# Wait this many seconds (default 5) for server to start before running checks.
WAIT="${DOKKU_CHECKS_WAIT:-5}"