Skip to content

Instantly share code, notes, and snippets.

@pythdasch
Created June 2, 2016 16:43
Show Gist options
  • Save pythdasch/6cccb4eb21ffecefb069752f1e5b9676 to your computer and use it in GitHub Desktop.
Save pythdasch/6cccb4eb21ffecefb069752f1e5b9676 to your computer and use it in GitHub Desktop.
root@thumbor:~# dokku ps:rebuild thumbor
+ case "$(lsb_release -si)" in
++ lsb_release -si
+ export DOKKU_DISTRO=ubuntu
+ DOKKU_DISTRO=ubuntu
+ export DOKKU_IMAGE=gliderlabs/herokuish
+ DOKKU_IMAGE=gliderlabs/herokuish
+ export DOKKU_LIB_ROOT=/var/lib/dokku
+ DOKKU_LIB_ROOT=/var/lib/dokku
+ export PLUGIN_PATH=/var/lib/dokku/plugins
+ PLUGIN_PATH=/var/lib/dokku/plugins
+ export PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ export PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ export PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ export PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ export PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ export DOKKU_API_VERSION=1
+ DOKKU_API_VERSION=1
+ export DOKKU_NOT_IMPLEMENTED_EXIT=10
+ DOKKU_NOT_IMPLEMENTED_EXIT=10
+ export DOKKU_VALID_EXIT=0
+ DOKKU_VALID_EXIT=0
+ export DOKKU_LOGS_DIR=/var/log/dokku
+ DOKKU_LOGS_DIR=/var/log/dokku
+ export DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ export DOKKU_CONTAINER_LABEL=dokku
+ DOKKU_CONTAINER_LABEL=dokku
+ export DOKKU_GLOBAL_RUN_ARGS=--label=dokku
+ DOKKU_GLOBAL_RUN_ARGS=--label=dokku
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ parse_args ps:rebuild thumbor
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=("$@")
+ local args
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=2
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=3
+ return 0
+ args=("$@")
+ [[ ps:rebuild =~ ^--.* ]]
+ has_tty
+ declare 'desc=return 0 if we have a tty'
++ /usr/bin/tty
+ [[ /dev/pts/0 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ root != \d\o\k\k\u ]]
+ [[ ! ps:rebuild =~ plugin:* ]]
++ id -un
+ export SSH_USER=root
+ SSH_USER=root
+ sudo -u dokku -E -H /usr/local/bin/dokku ps:rebuild thumbor
+ case "$(lsb_release -si)" in
++ lsb_release -si
+ export DOKKU_DISTRO=ubuntu
+ DOKKU_DISTRO=ubuntu
+ export DOKKU_IMAGE=gliderlabs/herokuish
+ DOKKU_IMAGE=gliderlabs/herokuish
+ export DOKKU_LIB_ROOT=/var/lib/dokku
+ DOKKU_LIB_ROOT=/var/lib/dokku
+ export PLUGIN_PATH=/var/lib/dokku/plugins
+ PLUGIN_PATH=/var/lib/dokku/plugins
+ export PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ export PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ export PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ export PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ export PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ export DOKKU_API_VERSION=1
+ DOKKU_API_VERSION=1
+ export DOKKU_NOT_IMPLEMENTED_EXIT=10
+ DOKKU_NOT_IMPLEMENTED_EXIT=10
+ export DOKKU_VALID_EXIT=0
+ DOKKU_VALID_EXIT=0
+ export DOKKU_LOGS_DIR=/var/log/dokku
+ DOKKU_LOGS_DIR=/var/log/dokku
+ export DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ export DOKKU_CONTAINER_LABEL=dokku
+ DOKKU_CONTAINER_LABEL=dokku
+ export DOKKU_GLOBAL_RUN_ARGS=--label=dokku
+ DOKKU_GLOBAL_RUN_ARGS=--label=dokku
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ parse_args ps:rebuild thumbor
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=("$@")
+ local args
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=2
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=3
+ return 0
+ args=("$@")
+ [[ ps:rebuild =~ ^--.* ]]
+ has_tty
+ declare 'desc=return 0 if we have a tty'
++ /usr/bin/tty
+ [[ /dev/pts/0 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
++ id -un
+ [[ dokku != \r\o\o\t ]]
+ [[ ps:rebuild =~ ^plugin:.* ]]
+ [[ -n '' ]]
+ dokku_auth ps:rebuild thumbor
+ declare 'desc=calls user-auth plugin trigger'
+ export SSH_USER=root
+ SSH_USER=root
+ export SSH_NAME=default
+ SSH_NAME=default
+ plugn trigger user-auth root default ps:rebuild thumbor
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
+ return 0
+ case "$1" in
+ execute_dokku_cmd ps:rebuild thumbor
+ declare 'desc=executes dokku sub-commands'
+ local PLUGIN_NAME=ps:rebuild
+ local PLUGIN_CMD=ps:rebuild
+ local implemented=0
+ local script
+ argv=("$@")
+ local argv
+ case "$PLUGIN_NAME" in
++ readlink -f /var/lib/dokku/plugins/enabled/ps
+ [[ /var/lib/dokku/core-plugins/available/ps == *core-plugins* ]]
+ [[ ps:rebuild == \p\s\:\r\e\b\u\i\l\d ]]
+ shift 1
+ [[ ! -z '' ]]
+ set -- ps:rebuild thumbor
+ [[ -x /var/lib/dokku/plugins/enabled/ps:rebuild/subcommands/default ]]
+ [[ -x /var/lib/dokku/plugins/enabled/ps:rebuild/subcommands/ps:rebuild ]]
+ [[ -x /var/lib/dokku/plugins/enabled/ps/subcommands/rebuild ]]
+ /var/lib/dokku/plugins/enabled/ps/subcommands/rebuild ps:rebuild thumbor
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ source /var/lib/dokku/plugins/available/ps/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
++ source /var/lib/dokku/plugins/available/config/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
+ ps_rebuild_cmd ps:rebuild thumbor
+ declare 'desc=rebuilds app via command line'
+ local cmd=ps:rebuild
+ [[ -z thumbor ]]
+ ps_rebuild thumbor
+ declare 'desc=rebuilds app from base image'
+ local APP=thumbor
+ verify_app_name thumbor
+ declare 'desc=verify app name format and app existence'
+ local APP=thumbor
+ [[ ! -n thumbor ]]
+ [[ ! thumbor =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/thumbor ]]
+ return 0
+ plugn trigger receive-app thumbor
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ git_receive_app thumbor
+ declare 'desc=git receive-app plugin trigger'
+ local trigger=git_receive_app
+ local APP=thumbor
+ local REV=
+ [[ ! -d /home/dokku/thumbor/refs ]]
+ dokku git-build thumbor
+ case "$(lsb_release -si)" in
++ lsb_release -si
+ export DOKKU_DISTRO=ubuntu
+ DOKKU_DISTRO=ubuntu
+ export DOKKU_IMAGE=gliderlabs/herokuish
+ DOKKU_IMAGE=gliderlabs/herokuish
+ export DOKKU_LIB_ROOT=/var/lib/dokku
+ DOKKU_LIB_ROOT=/var/lib/dokku
+ export PLUGIN_PATH=/var/lib/dokku/plugins
+ PLUGIN_PATH=/var/lib/dokku/plugins
+ export PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ export PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ export PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ export PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ export PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ export DOKKU_API_VERSION=1
+ DOKKU_API_VERSION=1
+ export DOKKU_NOT_IMPLEMENTED_EXIT=10
+ DOKKU_NOT_IMPLEMENTED_EXIT=10
+ export DOKKU_VALID_EXIT=0
+ DOKKU_VALID_EXIT=0
+ export DOKKU_LOGS_DIR=/var/log/dokku
+ DOKKU_LOGS_DIR=/var/log/dokku
+ export DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ export DOKKU_CONTAINER_LABEL=dokku
+ DOKKU_CONTAINER_LABEL=dokku
+ export DOKKU_GLOBAL_RUN_ARGS=--label=dokku
+ DOKKU_GLOBAL_RUN_ARGS=--label=dokku
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ parse_args git-build thumbor
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=("$@")
+ local args
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=2
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=3
+ return 0
+ args=("$@")
+ [[ git-build =~ ^--.* ]]
+ has_tty
+ declare 'desc=return 0 if we have a tty'
++ /usr/bin/tty
+ [[ /dev/pts/0 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
++ id -un
+ [[ dokku != \r\o\o\t ]]
+ [[ git-build =~ ^plugin:.* ]]
+ [[ -n '' ]]
+ dokku_auth git-build thumbor
+ declare 'desc=calls user-auth plugin trigger'
+ export SSH_USER=root
+ SSH_USER=root
+ export SSH_NAME=default
+ SSH_NAME=default
+ plugn trigger user-auth root default git-build thumbor
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
+ return 0
+ case "$1" in
+ execute_dokku_cmd git-build thumbor
+ declare 'desc=executes dokku sub-commands'
+ local PLUGIN_NAME=git-build
+ local PLUGIN_CMD=git-build
+ local implemented=0
+ local script
+ argv=("$@")
+ local argv
+ case "$PLUGIN_NAME" in
++ readlink -f /var/lib/dokku/plugins/enabled/git-build
+ [[ /var/lib/dokku/plugins/enabled/git-build == *core-plugins* ]]
+ [[ -x /var/lib/dokku/plugins/enabled/git-build/subcommands/default ]]
+ [[ -x /var/lib/dokku/plugins/enabled/git-build/subcommands/git-build ]]
+ [[ -x /var/lib/dokku/plugins/enabled/git-build/subcommands/git-build ]]
+ [[ 0 -eq 0 ]]
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/00_dokku-standard/commands git-build thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/20_events/commands git-build thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/apps/commands git-build thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/certs/commands git-build thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/checks/commands git-build thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/config/commands git-build thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/docker-options/commands git-build thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/domains/commands git-build thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/enter/commands git-build thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/git/commands git-build thumbor
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ source /var/lib/dokku/plugins/available/apps/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
++ source /var/lib/dokku/plugins/available/config/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
+ source /var/lib/dokku/plugins/available/config/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+ case "$1" in
+ git_build_cmd git-build thumbor
+ declare 'desc=lock git-build'
+ local cmd=git-build
+ local APP=thumbor
+ local APP_BUILD_LOCK=/home/dokku/thumbor/.build.lock
+ local 'APP_BUILD_LOCK_MSG=thumbor is currently being deployed or locked. Waiting...'
++ flock -n /home/dokku/thumbor/.build.lock true
++ echo 0
+ [[ 0 -ne 0 ]]
+ shift 1
+ flock -o /home/dokku/thumbor/.build.lock dokku git-build-locked thumbor
+ case "$(lsb_release -si)" in
++ lsb_release -si
+ export DOKKU_DISTRO=ubuntu
+ DOKKU_DISTRO=ubuntu
+ export DOKKU_IMAGE=gliderlabs/herokuish
+ DOKKU_IMAGE=gliderlabs/herokuish
+ export DOKKU_LIB_ROOT=/var/lib/dokku
+ DOKKU_LIB_ROOT=/var/lib/dokku
+ export PLUGIN_PATH=/var/lib/dokku/plugins
+ PLUGIN_PATH=/var/lib/dokku/plugins
+ export PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ export PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ export PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ export PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ export PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ export DOKKU_API_VERSION=1
+ DOKKU_API_VERSION=1
+ export DOKKU_NOT_IMPLEMENTED_EXIT=10
+ DOKKU_NOT_IMPLEMENTED_EXIT=10
+ export DOKKU_VALID_EXIT=0
+ DOKKU_VALID_EXIT=0
+ export DOKKU_LOGS_DIR=/var/log/dokku
+ DOKKU_LOGS_DIR=/var/log/dokku
+ export DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ export DOKKU_CONTAINER_LABEL=dokku
+ DOKKU_CONTAINER_LABEL=dokku
+ export DOKKU_GLOBAL_RUN_ARGS=--label=dokku
+ DOKKU_GLOBAL_RUN_ARGS=--label=dokku
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ parse_args git-build-locked thumbor
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=("$@")
+ local args
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=2
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=3
+ return 0
+ args=("$@")
+ [[ git-build-locked =~ ^--.* ]]
+ has_tty
+ declare 'desc=return 0 if we have a tty'
++ /usr/bin/tty
+ [[ /dev/pts/0 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
++ id -un
+ [[ dokku != \r\o\o\t ]]
+ [[ git-build-locked =~ ^plugin:.* ]]
+ [[ -n '' ]]
+ dokku_auth git-build-locked thumbor
+ declare 'desc=calls user-auth plugin trigger'
+ export SSH_USER=root
+ SSH_USER=root
+ export SSH_NAME=default
+ SSH_NAME=default
+ plugn trigger user-auth root default git-build-locked thumbor
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
+ return 0
+ case "$1" in
+ execute_dokku_cmd git-build-locked thumbor
+ declare 'desc=executes dokku sub-commands'
+ local PLUGIN_NAME=git-build-locked
+ local PLUGIN_CMD=git-build-locked
+ local implemented=0
+ local script
+ argv=("$@")
+ local argv
+ case "$PLUGIN_NAME" in
++ readlink -f /var/lib/dokku/plugins/enabled/git-build-locked
+ [[ /var/lib/dokku/plugins/enabled/git-build-locked == *core-plugins* ]]
+ [[ -x /var/lib/dokku/plugins/enabled/git-build-locked/subcommands/default ]]
+ [[ -x /var/lib/dokku/plugins/enabled/git-build-locked/subcommands/git-build-locked ]]
+ [[ -x /var/lib/dokku/plugins/enabled/git-build-locked/subcommands/git-build-locked ]]
+ [[ 0 -eq 0 ]]
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/00_dokku-standard/commands git-build-locked thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/20_events/commands git-build-locked thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/apps/commands git-build-locked thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/certs/commands git-build-locked thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/checks/commands git-build-locked thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/config/commands git-build-locked thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/docker-options/commands git-build-locked thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/domains/commands git-build-locked thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/enter/commands git-build-locked thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/git/commands git-build-locked thumbor
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ source /var/lib/dokku/plugins/available/apps/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
++ source /var/lib/dokku/plugins/available/config/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
+ source /var/lib/dokku/plugins/available/config/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+ case "$1" in
+ git_build_locked_cmd git-build-locked thumbor
+ declare 'desc=setup and call git_build_app_repo'
+ local cmd=git-build-locked
+ local APP=thumbor
+ [[ 2 -ge 3 ]]
+ local REF=400633f91e8245c44f5954041c8ca7e39c07a6b8
+ git_build_app_repo thumbor 400633f91e8245c44f5954041c8ca7e39c07a6b8
+ declare 'desc=builds local git app repo for app'
+ verify_app_name thumbor
+ declare 'desc=verify app name format and app existence'
+ local APP=thumbor
+ [[ ! -n thumbor ]]
+ [[ ! thumbor =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/thumbor ]]
+ return 0
+ local APP=thumbor
+ local REV=400633f91e8245c44f5954041c8ca7e39c07a6b8
++ mktemp -d /tmp/dokku_git.XXXX
+ local GIT_BUILD_APP_REPO_TMP_WORK_DIR=/tmp/dokku_git.ipYD
+ trap 'rm -rf "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" > /dev/null' RETURN INT TERM EXIT
+ local TMP_TAG=dokku/400633f91e8245c44f5954041c8ca7e39c07a6b8
+ chmod 755 /tmp/dokku_git.ipYD
+ unset GIT_DIR GIT_WORK_TREE
+ pushd /tmp/dokku_git.ipYD
+ [[ ! -d /home/dokku/thumbor ]]
+ GIT_DIR=/home/dokku/thumbor
+ git tag -d dokku/400633f91e8245c44f5954041c8ca7e39c07a6b8
+ true
+ GIT_DIR=/home/dokku/thumbor
+ git tag dokku/400633f91e8245c44f5954041c8ca7e39c07a6b8 400633f91e8245c44f5954041c8ca7e39c07a6b8
+ git init
+ git config advice.detachedHead false
+ git remote add origin /home/dokku/thumbor
+ git fetch --depth=1 origin refs/tags/dokku/400633f91e8245c44f5954041c8ca7e39c07a6b8
+ git reset --hard FETCH_HEAD
+ git submodule update --init --recursive
+ GIT_DIR=/home/dokku/thumbor
+ git tag -d dokku/400633f91e8245c44f5954041c8ca7e39c07a6b8
+ find -name .git -prune -exec rm -rf '{}' ';'
+ [[ -f Dockerfile ]]
++ [[ -f .env ]]
++ echo 1
+ [[ 1 != \0 ]]
+ [[ ! -f .buildpacks ]]
++ config_get thumbor BUILDPACK_URL
++ declare 'desc=get value of given config var'
++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get thumbor BUILDPACK_URL
++ config_parse_args config:get thumbor BUILDPACK_URL
++ declare 'desc=parse config plugin args'
++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ for var in '"$@"'
++ [[ config:get == \-\-\g\l\o\b\a\l ]]
++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ config:get == \-\-\e\x\p\o\r\t ]]
++ [[ config:get == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
++ [[ thumbor == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ BUILDPACK_URL == \-\-\g\l\o\b\a\l ]]
++ [[ BUILDPACK_URL == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ BUILDPACK_URL == \-\-\e\x\p\o\r\t ]]
++ [[ BUILDPACK_URL == \-\-\s\h\e\l\l ]]
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor BUILDPACK_URL
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor BUILDPACK_URL
++ local SANITIZED_ARGS
++ set -- config:get thumbor BUILDPACK_URL
++ DOKKU_CONFIG_TYPE=app
++ DOKKU_CONFIG_RESTART=true
++ [[ app == \a\p\p ]]
++ [[ -z thumbor ]]
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
++ APP=thumbor
++ ENV_FILE=/home/dokku/thumbor/ENV
++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor BUILDPACK_URL
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor BUILDPACK_URL
++ local SANITIZED_ARGS
++ set -- config:get thumbor BUILDPACK_URL
++ [[ -z thumbor ]]
++ config_create /home/dokku/thumbor/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/thumbor/ENV
++ [[ -f /home/dokku/thumbor/ENV ]]
++ [[ ! -s /home/dokku/thumbor/ENV ]]
++ local KEY=BUILDPACK_URL
++ sed -e 's/^'\''//' -e 's/'\''$//'
++ cut -d= -f2-
++ grep '^export BUILDPACK_URL='
++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
++ true
+ [[ -z '' ]]
+ plugn trigger pre-receive-app thumbor dockerfile /tmp/dokku_git.ipYD 400633f91e8245c44f5954041c8ca7e39c07a6b8
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
/'sed -u 's/^/
+ dokku receive thumbor dockerfile /tmp/dokku_git.ipYD
+ case "$(lsb_release -si)" in
++ lsb_release -si
+ export DOKKU_DISTRO=ubuntu
+ DOKKU_DISTRO=ubuntu
+ export DOKKU_IMAGE=gliderlabs/herokuish
+ DOKKU_IMAGE=gliderlabs/herokuish
+ export DOKKU_LIB_ROOT=/var/lib/dokku
+ DOKKU_LIB_ROOT=/var/lib/dokku
+ export PLUGIN_PATH=/var/lib/dokku/plugins
+ PLUGIN_PATH=/var/lib/dokku/plugins
+ export PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ export PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ export PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ export PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ export PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ export DOKKU_API_VERSION=1
+ DOKKU_API_VERSION=1
+ export DOKKU_NOT_IMPLEMENTED_EXIT=10
+ DOKKU_NOT_IMPLEMENTED_EXIT=10
+ export DOKKU_VALID_EXIT=0
+ DOKKU_VALID_EXIT=0
+ export DOKKU_LOGS_DIR=/var/log/dokku
+ DOKKU_LOGS_DIR=/var/log/dokku
+ export DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ export DOKKU_CONTAINER_LABEL=dokku
+ DOKKU_CONTAINER_LABEL=dokku
+ export DOKKU_GLOBAL_RUN_ARGS=--label=dokku
+ DOKKU_GLOBAL_RUN_ARGS=--label=dokku
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ parse_args receive thumbor dockerfile /tmp/dokku_git.ipYD
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=("$@")
+ local args
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=2
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=3
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=4
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=5
+ return 0
+ args=("$@")
+ [[ receive =~ ^--.* ]]
+ has_tty
+ declare 'desc=return 0 if we have a tty'
++ /usr/bin/tty
+ [[ /dev/pts/0 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
++ id -un
+ [[ dokku != \r\o\o\t ]]
+ [[ receive =~ ^plugin:.* ]]
+ [[ -n '' ]]
+ dokku_auth receive thumbor dockerfile /tmp/dokku_git.ipYD
+ declare 'desc=calls user-auth plugin trigger'
+ export SSH_USER=root
+ SSH_USER=root
+ export SSH_NAME=default
+ SSH_NAME=default
+ plugn trigger user-auth root default receive thumbor dockerfile /tmp/dokku_git.ipYD
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
+ return 0
+ case "$1" in
+ execute_dokku_cmd receive thumbor dockerfile /tmp/dokku_git.ipYD
+ declare 'desc=executes dokku sub-commands'
+ local PLUGIN_NAME=receive
+ local PLUGIN_CMD=receive
+ local implemented=0
+ local script
+ argv=("$@")
+ local argv
+ case "$PLUGIN_NAME" in
+ local PLUGIN_NAME=00_dokku-standard
++ readlink -f /var/lib/dokku/plugins/enabled/00_dokku-standard
+ [[ /var/lib/dokku/core-plugins/available/00_dokku-standard == *core-plugins* ]]
+ [[ receive == \r\e\c\e\i\v\e ]]
+ shift 1
+ [[ ! -z '' ]]
+ set -- receive thumbor dockerfile /tmp/dokku_git.ipYD
+ [[ -x /var/lib/dokku/plugins/enabled/00_dokku-standard/subcommands/default ]]
+ [[ -x /var/lib/dokku/plugins/enabled/00_dokku-standard/subcommands/receive ]]
+ /var/lib/dokku/plugins/enabled/00_dokku-standard/subcommands/receive receive thumbor dockerfile /tmp/dokku_git.ipYD
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ source /var/lib/dokku/plugins/available/config/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+ dokku_receive_cmd receive thumbor dockerfile /tmp/dokku_git.ipYD
+ declare 'desc=receives an app kicks off deploy process'
+ local cmd=receive
+ local APP=thumbor
++ get_app_image_name thumbor
++ declare 'desc=return image identifier for a given app, tag tuple. validate if tag is presented'
++ local APP=thumbor
++ local IMAGE_TAG=
+++ get_app_image_repo thumbor
+++ declare 'desc=central definition of image repo pattern'
+++ local APP=thumbor
+++ local IMAGE_REPO=dokku/thumbor
+++ [[ -z thumbor ]]
+++ echo dokku/thumbor
++ local IMAGE_REPO=dokku/thumbor
++ [[ -z thumbor ]]
++ [[ -n '' ]]
++ local IMAGE=dokku/thumbor:latest
++ echo dokku/thumbor:latest
+ local IMAGE=dokku/thumbor:latest
+ local IMAGE_SOURCE_TYPE=dockerfile
+ local TMP_WORK_DIR=/tmp/dokku_git.ipYD
+ [[ -z '' ]]
+ dokku_log_info1 'Cleaning up...'
+ declare 'desc=log info1 formatter'
+ echo '-----> Cleaning up...'
+ docker_cleanup
-----> Cleaning up...
+ declare 'desc=cleans up all exited/dead containers and removes all dangling images'
++ docker ps -a -f status=exited -f label=dokku -q
+ docker rm 05f7b21604bd
++ docker ps -a -f status=dead -f label=dokku -q
+ docker rm
+ true
+ dokku_log_info1 'Building thumbor from dockerfile...'
+ declare 'desc=log info1 formatter'
+ echo '-----> Building thumbor from dockerfile...'
+ config_set --no-restart thumbor DOKKU_APP_TYPE=dockerfile
-----> Building thumbor from dockerfile...
++ docker images -f dangling=true -q
+ docker rmi be68941f5306
+ dokku build thumbor dockerfile /tmp/dokku_git.ipYD
+ case "$(lsb_release -si)" in
++ lsb_release -si
+ export DOKKU_DISTRO=ubuntu
+ DOKKU_DISTRO=ubuntu
+ export DOKKU_IMAGE=gliderlabs/herokuish
+ DOKKU_IMAGE=gliderlabs/herokuish
+ export DOKKU_LIB_ROOT=/var/lib/dokku
+ DOKKU_LIB_ROOT=/var/lib/dokku
+ export PLUGIN_PATH=/var/lib/dokku/plugins
+ PLUGIN_PATH=/var/lib/dokku/plugins
+ export PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ export PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ export PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ export PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ export PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ export DOKKU_API_VERSION=1
+ DOKKU_API_VERSION=1
+ export DOKKU_NOT_IMPLEMENTED_EXIT=10
+ DOKKU_NOT_IMPLEMENTED_EXIT=10
+ export DOKKU_VALID_EXIT=0
+ DOKKU_VALID_EXIT=0
+ export DOKKU_LOGS_DIR=/var/log/dokku
+ DOKKU_LOGS_DIR=/var/log/dokku
+ export DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ export DOKKU_CONTAINER_LABEL=dokku
+ DOKKU_CONTAINER_LABEL=dokku
+ export DOKKU_GLOBAL_RUN_ARGS=--label=dokku
+ DOKKU_GLOBAL_RUN_ARGS=--label=dokku
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ parse_args build thumbor dockerfile /tmp/dokku_git.ipYD
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=("$@")
+ local args
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=2
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=3
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=4
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=5
+ return 0
+ args=("$@")
+ [[ build =~ ^--.* ]]
+ has_tty
+ declare 'desc=return 0 if we have a tty'
++ /usr/bin/tty
+ [[ /dev/pts/0 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
++ id -un
+ [[ dokku != \r\o\o\t ]]
+ [[ build =~ ^plugin:.* ]]
+ [[ -n '' ]]
+ dokku_auth build thumbor dockerfile /tmp/dokku_git.ipYD
+ declare 'desc=calls user-auth plugin trigger'
+ export SSH_USER=root
+ SSH_USER=root
+ export SSH_NAME=default
+ SSH_NAME=default
+ plugn trigger user-auth root default build thumbor dockerfile /tmp/dokku_git.ipYD
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
+ return 0
+ case "$1" in
+ execute_dokku_cmd build thumbor dockerfile /tmp/dokku_git.ipYD
+ declare 'desc=executes dokku sub-commands'
+ local PLUGIN_NAME=build
+ local PLUGIN_CMD=build
+ local implemented=0
+ local script
+ argv=("$@")
+ local argv
+ case "$PLUGIN_NAME" in
+ local PLUGIN_NAME=00_dokku-standard
++ readlink -f /var/lib/dokku/plugins/enabled/00_dokku-standard
+ [[ /var/lib/dokku/core-plugins/available/00_dokku-standard == *core-plugins* ]]
+ [[ build == \b\u\i\l\d ]]
+ shift 1
+ [[ ! -z '' ]]
+ set -- build thumbor dockerfile /tmp/dokku_git.ipYD
+ [[ -x /var/lib/dokku/plugins/enabled/00_dokku-standard/subcommands/default ]]
+ [[ -x /var/lib/dokku/plugins/enabled/00_dokku-standard/subcommands/build ]]
+ /var/lib/dokku/plugins/enabled/00_dokku-standard/subcommands/build build thumbor dockerfile /tmp/dokku_git.ipYD
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ source /var/lib/dokku/plugins/available/config/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+ dokku_build_cmd build thumbor dockerfile /tmp/dokku_git.ipYD
+ declare 'desc=build phase'
+ local cmd=build
+ local APP=thumbor
+ local IMAGE_SOURCE_TYPE=dockerfile
+ local TMP_WORK_DIR=/tmp/dokku_git.ipYD
++ get_app_image_name thumbor
++ declare 'desc=return image identifier for a given app, tag tuple. validate if tag is presented'
++ local APP=thumbor
++ local IMAGE_TAG=
+++ get_app_image_repo thumbor
+++ declare 'desc=central definition of image repo pattern'
+++ local APP=thumbor
+++ local IMAGE_REPO=dokku/thumbor
+++ [[ -z thumbor ]]
+++ echo dokku/thumbor
++ local IMAGE_REPO=dokku/thumbor
++ [[ -z thumbor ]]
++ [[ -n '' ]]
++ local IMAGE=dokku/thumbor:latest
++ echo dokku/thumbor:latest
+ local IMAGE=dokku/thumbor:latest
+ verify_app_name thumbor
+ declare 'desc=verify app name format and app existence'
+ local APP=thumbor
+ [[ ! -n thumbor ]]
+ [[ ! thumbor =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/thumbor ]]
+ return 0
+ local CACHE_DIR=/home/dokku/thumbor/cache
++ config_export app thumbor
++ declare 'desc=returns export command for config variable of specified type (app/global)'
++ local CONFIG_TYPE=app
++ local APP=thumbor
++ local ENV_FILE=/home/dokku/thumbor/ENV
++ [[ app == \g\l\o\b\a\l ]]
++ [[ ! -f /home/dokku/thumbor/ENV ]]
++ [[ ! -s /home/dokku/thumbor/ENV ]]
+++ cut '-d ' -f2-
+++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
++ local 'VARS=DOKKU_APP_RESTORE='\''1'\''
DOKKU_APP_TYPE='\''dockerfile'\''
DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\''
DOKKU_DOCKERFILE_PORTS='\''8080'\''
DOKKU_NGINX_PORT='\''80'\''
THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\'''
++ awk '{print "export " $0}'
++ echo 'DOKKU_APP_RESTORE='\''1'\''
DOKKU_APP_TYPE='\''dockerfile'\''
DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\''
DOKKU_DOCKERFILE_PORTS='\''8080'\''
DOKKU_NGINX_PORT='\''80'\''
THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\'''
++ return 0
+ eval 'export DOKKU_APP_RESTORE='\''1'\''
export DOKKU_APP_TYPE='\''dockerfile'\''
export DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\''
export DOKKU_DOCKERFILE_PORTS='\''8080'\''
export DOKKU_NGINX_PORT='\''80'\''
export THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\'''
++ export DOKKU_APP_RESTORE=1
++ DOKKU_APP_RESTORE=1
++ export DOKKU_APP_TYPE=dockerfile
++ DOKKU_APP_TYPE=dockerfile
++ export 'DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf'
++ DOKKU_DOCKERFILE_CMD='CMD thumbor -p $PORT -c thumbor.conf'
++ export DOKKU_DOCKERFILE_PORTS=8080
++ DOKKU_DOCKERFILE_PORTS=8080
++ export DOKKU_NGINX_PORT=80
++ DOKKU_NGINX_PORT=80
++ export 'THUMBOR_SECURITY_KEY=lkjf78ddqqsd!'
++ THUMBOR_SECURITY_KEY='lkjf78ddqqsd!'
+ pushd /tmp/dokku_git.ipYD
+ case "$IMAGE_SOURCE_TYPE" in
++ get_dockerfile_exposed_ports Dockerfile
++ declare 'desc=return all exposed ports from passed file path'
+++ xargs
+++ awk '{ print $2 }'
+++ egrep '^EXPOSE ' Dockerfile
++ local DOCKERFILE_PORTS=
++ echo ''
+ local DOCKERFILE_PORTS=
+ [[ -n '' ]]
++ extract_directive_from_dockerfile Dockerfile ENTRYPOINT
++ declare 'desc=return requested directive from passed file path'
++ local FILE_PATH=Dockerfile
++ local SEARCH_STRING=ENTRYPOINT
+++ tail -n1
+++ egrep '^ENTRYPOINT ' Dockerfile
++ local FOUND_LINE=
++ echo ''
+ local DOCKERFILE_ENTRYPOINT=
+ [[ -n '' ]]
++ extract_directive_from_dockerfile Dockerfile CMD
++ declare 'desc=return requested directive from passed file path'
++ local FILE_PATH=Dockerfile
++ local SEARCH_STRING=CMD
+++ tail -n1
+++ egrep '^CMD ' Dockerfile
++ local 'FOUND_LINE=CMD thumbor -p $PORT -c thumbor.conf'
++ echo 'CMD thumbor -p $PORT -c thumbor.conf'
+ local 'DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf'
+ [[ -n CMD thumbor -p $PORT -c thumbor.conf ]]
+ config_set --no-restart thumbor 'DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf'
+ declare 'desc=set value of given config var'
+ [[ --no-restart == \c\o\n\f\i\g\:\s\e\t ]]
+ set -- config:set --no-restart thumbor 'DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf'
+ config_parse_args config:set --no-restart thumbor 'DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf'
+ declare 'desc=parse config plugin args'
+ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+ for var in '"$@"'
+ [[ config:set == \-\-\g\l\o\b\a\l ]]
+ [[ config:set == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+ [[ config:set == \-\-\e\x\p\o\r\t ]]
+ [[ config:set == \-\-\s\h\e\l\l ]]
+ for var in '"$@"'
+ [[ --no-restart == \-\-\g\l\o\b\a\l ]]
+ [[ --no-restart == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+ DOKKU_CONFIG_RESTART=false
+ [[ --no-restart == \-\-\e\x\p\o\r\t ]]
+ [[ --no-restart == \-\-\s\h\e\l\l ]]
+ for var in '"$@"'
+ [[ thumbor == \-\-\g\l\o\b\a\l ]]
+ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+ [[ thumbor == \-\-\e\x\p\o\r\t ]]
+ [[ thumbor == \-\-\s\h\e\l\l ]]
+ for var in '"$@"'
+ [[ DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf == \-\-\g\l\o\b\a\l ]]
+ [[ DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+ [[ DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf == \-\-\e\x\p\o\r\t ]]
+ [[ DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf == \-\-\s\h\e\l\l ]]
+ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
++ get_sanitized_config_args config:set --no-restart thumbor 'DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf'
++ local 'desc=return sanitized arguments for config plugin'
++ SANITIZED_ARGS=("$@")
++ local SANITIZED_ARGS
++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
++ echo config:set '' thumbor 'DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf'
+ local SANITIZED_ARGS
+ set -- config:set thumbor DOKKU_DOCKERFILE_CMD=CMD thumbor -p '$PORT' -c thumbor.conf
+ DOKKU_CONFIG_TYPE=app
+ DOKKU_CONFIG_RESTART=false
+ [[ app == \a\p\p ]]
+ [[ -z thumbor ]]
+ verify_app_name thumbor
+ declare 'desc=verify app name format and app existence'
+ local APP=thumbor
+ [[ ! -n thumbor ]]
+ [[ ! thumbor =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/thumbor ]]
+ return 0
+ APP=thumbor
+ ENV_FILE=/home/dokku/thumbor/ENV
+ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+ [[ -z thumbor DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf ]]
+ config_create /home/dokku/thumbor/ENV
+ declare 'desc=create config env file'
+ local ENV_FILE=/home/dokku/thumbor/ENV
+ [[ -f /home/dokku/thumbor/ENV ]]
+ local ENV_ADD=
++ cat /home/dokku/thumbor/ENV
+ local 'ENV_TEMP=export DOKKU_APP_RESTORE='\''1'\''
export DOKKU_APP_TYPE='\''dockerfile'\''
export DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\''
export DOKKU_DOCKERFILE_PORTS='\''8080'\''
export DOKKU_NGINX_PORT='\''80'\''
export THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\'''
+ local RESTART_APP=false
+ shift 2
+ for var in '"$@"'
+ [[ thumbor == \-\-\g\l\o\b\a\l ]]
+ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+ [[ -n thumbor ]]
+ [[ thumbor == \t\h\u\m\b\o\r ]]
+ shift 1
+ for var in '"$@"'
+ [[ DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf == \-\-\g\l\o\b\a\l ]]
+ [[ DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+ [[ -n thumbor ]]
+ [[ DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf == \t\h\u\m\b\o\r ]]
+ [[ DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf != *\=* ]]
+ for var in '"$@"'
++ cut -d= -f1
++ echo DOKKU_DOCKERFILE_CMD=CMD thumbor -p '$PORT' -c thumbor.conf
+ local KEY=DOKKU_DOCKERFILE_CMD
++ cut -d= -f2-
++ echo DOKKU_DOCKERFILE_CMD=CMD thumbor -p '$PORT' -c thumbor.conf
+ local 'VALUE=CMD thumbor -p $PORT -c thumbor.conf'
+ [[ DOKKU_DOCKERFILE_CMD =~ [a-zA-Z_][a-zA-Z0-9_]* ]]
+ local RESTART_APP=true
++ sed '/^export DOKKU_DOCKERFILE_CMD=/ d'
++ echo 'export DOKKU_APP_RESTORE='\''1'\''
export DOKKU_APP_TYPE='\''dockerfile'\''
export DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\''
export DOKKU_DOCKERFILE_PORTS='\''8080'\''
export DOKKU_NGINX_PORT='\''80'\''
export THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\'''
+ local 'ENV_TEMP=export DOKKU_APP_RESTORE='\''1'\''
export DOKKU_APP_TYPE='\''dockerfile'\''
export DOKKU_DOCKERFILE_PORTS='\''8080'\''
export DOKKU_NGINX_PORT='\''80'\''
export THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\'''
+ local 'ENV_TEMP=export DOKKU_APP_RESTORE='\''1'\''
export DOKKU_APP_TYPE='\''dockerfile'\''
export DOKKU_DOCKERFILE_PORTS='\''8080'\''
export DOKKU_NGINX_PORT='\''80'\''
export THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\''
export DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\'''
++ sed '/^DOKKU_DOCKERFILE_CMD=/ d'
++ echo -e ''
+ local ENV_ADD=
+ local 'ENV_ADD=$
DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf'
++ tail -n +2
++ echo '$
DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf'
+ local 'ENV_ADD=DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf'
+ [[ -n true ]]
+ dokku_log_info1 'Setting config vars'
+ declare 'desc=log info1 formatter'
+ echo '-----> Setting config vars'
+ config_styled_hash 'DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf' ' '
-----> Setting config vars
+ declare 'desc=internal config hash'
+ local 'vars=DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf'
+ local 'prefix= '
+ local longest=
+ read -r word
++ cut -d= -f1
++ echo 'DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf'
+ local KEY=DOKKU_DOCKERFILE_CMD
+ [[ 20 -gt 0 ]]
+ local longest=DOKKU_DOCKERFILE_CMD
+ read -r word
+ read -r word
++ cut -d= -f1
++ echo 'DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf'
+ local KEY=DOKKU_DOCKERFILE_CMD
++ sed -e 's/^'\''//' -e 's/'\''$//' -e 's/$$//g'
++ cut -d= -f2-
++ echo 'DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf'
+ local 'VALUE=CMD thumbor -p $PORT -c thumbor.conf'
+ local num_zeros=0
+ local 'zeros= '
+ [[ 0 -gt 0 ]]
+ echo ' DOKKU_DOCKERFILE_CMD: CMD thumbor -p $PORT -c thumbor.conf'
+ read -r word
DOKKU_DOCKERFILE_CMD: CMD thumbor -p $PORT -c thumbor.conf
+ config_write 'export DOKKU_APP_RESTORE='\''1'\''
export DOKKU_APP_TYPE='\''dockerfile'\''
export DOKKU_DOCKERFILE_PORTS='\''8080'\''
export DOKKU_NGINX_PORT='\''80'\''
export THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\''
export DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\'''
+ declare 'desc=writes config vars out to appropriate file path'
+ local 'ENV_TEMP=export DOKKU_APP_RESTORE='\''1'\''
export DOKKU_APP_TYPE='\''dockerfile'\''
export DOKKU_DOCKERFILE_PORTS='\''8080'\''
export DOKKU_NGINX_PORT='\''80'\''
export THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\''
export DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\'''
+ local ENV_FILE_TEMP=/home/dokku/thumbor/ENV.tmp
+ sort
+ sed '/^$/d'
+ echo 'export DOKKU_APP_RESTORE='\''1'\''
export DOKKU_APP_TYPE='\''dockerfile'\''
export DOKKU_DOCKERFILE_PORTS='\''8080'\''
export DOKKU_NGINX_PORT='\''80'\''
export THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\''
export DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\'''
+ cmp -s /home/dokku/thumbor/ENV /home/dokku/thumbor/ENV.tmp
+ rm -f /home/dokku/thumbor/ENV.tmp
+ plugn trigger post-config-update thumbor set 'DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf'
+ [[ -n thumbor ]]
++ config_get thumbor DOKKU_APP_RESTORE
++ declare 'desc=get value of given config var'
++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get thumbor DOKKU_APP_RESTORE
++ config_parse_args config:get thumbor DOKKU_APP_RESTORE
++ declare 'desc=parse config plugin args'
++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ for var in '"$@"'
++ [[ config:get == \-\-\g\l\o\b\a\l ]]
++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ config:get == \-\-\e\x\p\o\r\t ]]
++ [[ config:get == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
++ [[ thumbor == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ DOKKU_APP_RESTORE == \-\-\g\l\o\b\a\l ]]
++ [[ DOKKU_APP_RESTORE == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ DOKKU_APP_RESTORE == \-\-\e\x\p\o\r\t ]]
++ [[ DOKKU_APP_RESTORE == \-\-\s\h\e\l\l ]]
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_APP_RESTORE
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_APP_RESTORE
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_APP_RESTORE
++ DOKKU_CONFIG_TYPE=app
++ DOKKU_CONFIG_RESTART=true
++ [[ app == \a\p\p ]]
++ [[ -z thumbor ]]
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
++ APP=thumbor
++ ENV_FILE=/home/dokku/thumbor/ENV
++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_APP_RESTORE
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_APP_RESTORE
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_APP_RESTORE
++ [[ -z thumbor ]]
++ config_create /home/dokku/thumbor/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/thumbor/ENV
++ [[ -f /home/dokku/thumbor/ENV ]]
++ [[ ! -s /home/dokku/thumbor/ENV ]]
++ local KEY=DOKKU_APP_RESTORE
++ sed -e 's/^'\''//' -e 's/'\''$//'
++ cut -d= -f2-
++ grep '^export DOKKU_APP_RESTORE='
++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
+ local DOKKU_APP_RESTORE=1
+ [[ false == \t\r\u\e ]]
+ plugn trigger pre-build-dockerfile thumbor
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
+ [[ '' == \f\a\l\s\e ]]
++ plugn trigger docker-args-build thumbor dockerfile
++ :
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
+ docker_args thumbor dockerfile
+ declare 'desc=docker args plugin trigger'
+ local trigger=/var/lib/dokku/plugins/enabled/docker-options/docker-args-build
++ cat
+ local STDIN=
+ local APP=thumbor
+ local IMAGE_SOURCE_TYPE=dockerfile
+ case "$0" in
+ local PHASE=BUILD
+ local FILE_PREFIX=DOCKER_OPTIONS_
+ local PHASE_FILE_PATH=/home/dokku/thumbor/DOCKER_OPTIONS_BUILD
+ local output=
+ [[ -f /home/dokku/thumbor/DOCKER_OPTIONS_BUILD ]]
+ echo -n ''
+ local DOCKER_ARGS=
+ docker build -t dokku/thumbor:latest .
Sending build context to Docker daemon 8.704 kB
Step 1 : FROM phusion/baseimage:0.9.16
---> bc823ab974aa
Step 2 : RUN apt-get update && apt-get install -y libgtk2.0-dev libjasper-dev libjpeg-dev libpng-dev libtiff-dev python-dev python-numpy python-opencv python-pip python-pycurl webp
---> Using cache
---> 79ad5bfacb0b
Step 3 : RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
---> Using cache
---> ed7a1ded3b91
Step 4 : RUN pip install thumbor==5.2.1
---> Using cache
---> b13a28712b1c
Step 5 : COPY thumbor.conf thumbor.conf
---> 4eae477b08ec
Removing intermediate container f3d902d6d63d
Step 6 : CMD thumbor -p $PORT -c thumbor.conf
---> Running in d02b65cb33b8
---> e1a1ded03fcd
Removing intermediate container d02b65cb33b8
Successfully built e1a1ded03fcd
+ plugn trigger post-build-dockerfile thumbor
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
+ implemented=1
+ [[ 1 -eq 0 ]]
+ [[ 1 -eq 0 ]]
+ release_and_deploy thumbor
+ declare 'desc=main function for releasing and deploying an app'
+ source /var/lib/dokku/plugins/available/config/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+ local APP=thumbor
+ local IMAGE_TAG=
++ get_app_image_name thumbor ''
++ declare 'desc=return image identifier for a given app, tag tuple. validate if tag is presented'
++ local APP=thumbor
++ local IMAGE_TAG=
+++ get_app_image_repo thumbor
+++ declare 'desc=central definition of image repo pattern'
+++ local APP=thumbor
+++ local IMAGE_REPO=dokku/thumbor
+++ [[ -z thumbor ]]
+++ echo dokku/thumbor
++ local IMAGE_REPO=dokku/thumbor
++ [[ -z thumbor ]]
++ [[ -n '' ]]
++ local IMAGE=dokku/thumbor:latest
++ echo dokku/thumbor:latest
+ local IMAGE=dokku/thumbor:latest
+ verify_app_name thumbor
+ declare 'desc=verify app name format and app existence'
+ local APP=thumbor
+ [[ ! -n thumbor ]]
+ [[ ! thumbor =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/thumbor ]]
+ return 0
+ verify_image dokku/thumbor:latest
+ declare 'desc=verify image existence'
+ local IMAGE=dokku/thumbor:latest
+ docker inspect dokku/thumbor:latest
+ return 0
+ is_image_herokuish_based dokku/thumbor:latest
+ declare 'desc=returns true if app image is based on herokuish'
+ [[ ! -f /home/ubuntu/.circlerc ]]
+ local DOCKER_ARGS=--rm
+ docker run --label=dokku --entrypoint=/bin/sh --rm dokku/thumbor:latest -c 'test -f /exec'
+ local IMAGE_SOURCE_TYPE=dockerfile
++ config_get thumbor DOKKU_SKIP_DEPLOY
++ declare 'desc=get value of given config var'
++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get thumbor DOKKU_SKIP_DEPLOY
++ config_parse_args config:get thumbor DOKKU_SKIP_DEPLOY
++ declare 'desc=parse config plugin args'
++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ for var in '"$@"'
++ [[ config:get == \-\-\g\l\o\b\a\l ]]
++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ config:get == \-\-\e\x\p\o\r\t ]]
++ [[ config:get == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
++ [[ thumbor == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ DOKKU_SKIP_DEPLOY == \-\-\g\l\o\b\a\l ]]
++ [[ DOKKU_SKIP_DEPLOY == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ DOKKU_SKIP_DEPLOY == \-\-\e\x\p\o\r\t ]]
++ [[ DOKKU_SKIP_DEPLOY == \-\-\s\h\e\l\l ]]
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_SKIP_DEPLOY
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_SKIP_DEPLOY
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_SKIP_DEPLOY
++ DOKKU_CONFIG_TYPE=app
++ DOKKU_CONFIG_RESTART=true
++ [[ app == \a\p\p ]]
++ [[ -z thumbor ]]
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
++ APP=thumbor
++ ENV_FILE=/home/dokku/thumbor/ENV
++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_SKIP_DEPLOY
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_SKIP_DEPLOY
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_SKIP_DEPLOY
++ [[ -z thumbor ]]
++ config_create /home/dokku/thumbor/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/thumbor/ENV
++ [[ -f /home/dokku/thumbor/ENV ]]
++ [[ ! -s /home/dokku/thumbor/ENV ]]
++ local KEY=DOKKU_SKIP_DEPLOY
++ sed -e 's/^'\''//' -e 's/'\''$//'
++ cut -d= -f2-
++ grep '^export DOKKU_SKIP_DEPLOY='
++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
++ true
+ local DOKKU_APP_SKIP_DEPLOY=
++ config_get --global DOKKU_SKIP_DEPLOY
++ declare 'desc=get value of given config var'
++ [[ --global == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get --global DOKKU_SKIP_DEPLOY
++ config_parse_args config:get --global DOKKU_SKIP_DEPLOY
++ declare 'desc=parse config plugin args'
++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ for var in '"$@"'
++ [[ config:get == \-\-\g\l\o\b\a\l ]]
++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ config:get == \-\-\e\x\p\o\r\t ]]
++ [[ config:get == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ --global == \-\-\g\l\o\b\a\l ]]
++ ENV_FILE=/home/dokku/ENV
++ DOKKU_CONFIG_TYPE=global
++ DOKKU_CONFIG_RESTART=false
++ [[ --global == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ --global == \-\-\e\x\p\o\r\t ]]
++ [[ --global == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ DOKKU_SKIP_DEPLOY == \-\-\g\l\o\b\a\l ]]
++ [[ DOKKU_SKIP_DEPLOY == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ DOKKU_SKIP_DEPLOY == \-\-\e\x\p\o\r\t ]]
++ [[ DOKKU_SKIP_DEPLOY == \-\-\s\h\e\l\l ]]
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get --global DOKKU_SKIP_DEPLOY
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get '' DOKKU_SKIP_DEPLOY
++ local SANITIZED_ARGS
++ set -- config:get DOKKU_SKIP_DEPLOY
++ DOKKU_CONFIG_TYPE=global
++ DOKKU_CONFIG_RESTART=false
++ [[ global == \a\p\p ]]
++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get --global DOKKU_SKIP_DEPLOY
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get '' DOKKU_SKIP_DEPLOY
++ local SANITIZED_ARGS
++ set -- config:get DOKKU_SKIP_DEPLOY
++ [[ -z DOKKU_SKIP_DEPLOY ]]
++ config_create /home/dokku/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/ENV
++ [[ -f /home/dokku/ENV ]]
++ [[ ! -s /home/dokku/ENV ]]
++ return 0
+ local DOKKU_GLOBAL_SKIP_DEPLOY=
+ local DOKKU_SKIP_DEPLOY=
+ dokku_log_info1 'Releasing thumbor (dokku/thumbor:latest)...'
+ declare 'desc=log info1 formatter'
+ echo '-----> Releasing thumbor (dokku/thumbor:latest)...'
+ dokku release thumbor dockerfile ''
-----> Releasing thumbor (dokku/thumbor:latest)...
+ case "$(lsb_release -si)" in
++ lsb_release -si
+ export DOKKU_DISTRO=ubuntu
+ DOKKU_DISTRO=ubuntu
+ export DOKKU_IMAGE=gliderlabs/herokuish
+ DOKKU_IMAGE=gliderlabs/herokuish
+ export DOKKU_LIB_ROOT=/var/lib/dokku
+ DOKKU_LIB_ROOT=/var/lib/dokku
+ export PLUGIN_PATH=/var/lib/dokku/plugins
+ PLUGIN_PATH=/var/lib/dokku/plugins
+ export PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ export PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ export PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ export PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ export PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ export DOKKU_API_VERSION=1
+ DOKKU_API_VERSION=1
+ export DOKKU_NOT_IMPLEMENTED_EXIT=10
+ DOKKU_NOT_IMPLEMENTED_EXIT=10
+ export DOKKU_VALID_EXIT=0
+ DOKKU_VALID_EXIT=0
+ export DOKKU_LOGS_DIR=/var/log/dokku
+ DOKKU_LOGS_DIR=/var/log/dokku
+ export DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ export DOKKU_CONTAINER_LABEL=dokku
+ DOKKU_CONTAINER_LABEL=dokku
+ export DOKKU_GLOBAL_RUN_ARGS=--label=dokku
+ DOKKU_GLOBAL_RUN_ARGS=--label=dokku
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ parse_args release thumbor dockerfile ''
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=("$@")
+ local args
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=2
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=3
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=4
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=5
+ return 0
+ args=("$@")
+ [[ release =~ ^--.* ]]
+ has_tty
+ declare 'desc=return 0 if we have a tty'
++ /usr/bin/tty
+ [[ /dev/pts/0 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
++ id -un
+ [[ dokku != \r\o\o\t ]]
+ [[ release =~ ^plugin:.* ]]
+ [[ -n '' ]]
+ dokku_auth release thumbor dockerfile ''
+ declare 'desc=calls user-auth plugin trigger'
+ export SSH_USER=root
+ SSH_USER=root
+ export SSH_NAME=default
+ SSH_NAME=default
+ plugn trigger user-auth root default release thumbor dockerfile ''
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
+ return 0
+ case "$1" in
+ execute_dokku_cmd release thumbor dockerfile ''
+ declare 'desc=executes dokku sub-commands'
+ local PLUGIN_NAME=release
+ local PLUGIN_CMD=release
+ local implemented=0
+ local script
+ argv=("$@")
+ local argv
+ case "$PLUGIN_NAME" in
+ local PLUGIN_NAME=00_dokku-standard
++ readlink -f /var/lib/dokku/plugins/enabled/00_dokku-standard
+ [[ /var/lib/dokku/core-plugins/available/00_dokku-standard == *core-plugins* ]]
+ [[ release == \r\e\l\e\a\s\e ]]
+ shift 1
+ [[ ! -z '' ]]
+ set -- release thumbor dockerfile ''
+ [[ -x /var/lib/dokku/plugins/enabled/00_dokku-standard/subcommands/default ]]
+ [[ -x /var/lib/dokku/plugins/enabled/00_dokku-standard/subcommands/release ]]
+ /var/lib/dokku/plugins/enabled/00_dokku-standard/subcommands/release release thumbor dockerfile ''
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ source /var/lib/dokku/plugins/available/config/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+ dokku_release_cmd release thumbor dockerfile ''
+ declare 'desc=release phase'
+ local cmd=release
+ local APP=thumbor
+ local IMAGE_SOURCE_TYPE=dockerfile
+ local IMAGE_TAG=
++ get_app_image_name thumbor ''
++ declare 'desc=return image identifier for a given app, tag tuple. validate if tag is presented'
++ local APP=thumbor
++ local IMAGE_TAG=
+++ get_app_image_repo thumbor
+++ declare 'desc=central definition of image repo pattern'
+++ local APP=thumbor
+++ local IMAGE_REPO=dokku/thumbor
+++ [[ -z thumbor ]]
+++ echo dokku/thumbor
++ local IMAGE_REPO=dokku/thumbor
++ [[ -z thumbor ]]
++ [[ -n '' ]]
++ local IMAGE=dokku/thumbor:latest
++ echo dokku/thumbor:latest
+ local IMAGE=dokku/thumbor:latest
+ verify_app_name thumbor
+ declare 'desc=verify app name format and app existence'
+ local APP=thumbor
+ [[ ! -n thumbor ]]
+ [[ ! thumbor =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/thumbor ]]
+ return 0
+ case "$IMAGE_SOURCE_TYPE" in
+ plugn trigger pre-release-dockerfile thumbor ''
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
+ plugn trigger post-release-dockerfile thumbor ''
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
+ implemented=1
+ [[ 1 -eq 0 ]]
+ [[ 1 -eq 0 ]]
+ [[ '' != \t\r\u\e ]]
+ dokku_log_info1 'Deploying thumbor (dokku/thumbor:latest)...'
+ declare 'desc=log info1 formatter'
+ echo '-----> Deploying thumbor (dokku/thumbor:latest)...'
+ dokku deploy thumbor ''
-----> Deploying thumbor (dokku/thumbor:latest)...
+ case "$(lsb_release -si)" in
++ lsb_release -si
+ export DOKKU_DISTRO=ubuntu
+ DOKKU_DISTRO=ubuntu
+ export DOKKU_IMAGE=gliderlabs/herokuish
+ DOKKU_IMAGE=gliderlabs/herokuish
+ export DOKKU_LIB_ROOT=/var/lib/dokku
+ DOKKU_LIB_ROOT=/var/lib/dokku
+ export PLUGIN_PATH=/var/lib/dokku/plugins
+ PLUGIN_PATH=/var/lib/dokku/plugins
+ export PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ export PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ export PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ export PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ export PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ export DOKKU_API_VERSION=1
+ DOKKU_API_VERSION=1
+ export DOKKU_NOT_IMPLEMENTED_EXIT=10
+ DOKKU_NOT_IMPLEMENTED_EXIT=10
+ export DOKKU_VALID_EXIT=0
+ DOKKU_VALID_EXIT=0
+ export DOKKU_LOGS_DIR=/var/log/dokku
+ DOKKU_LOGS_DIR=/var/log/dokku
+ export DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ export DOKKU_CONTAINER_LABEL=dokku
+ DOKKU_CONTAINER_LABEL=dokku
+ export DOKKU_GLOBAL_RUN_ARGS=--label=dokku
+ DOKKU_GLOBAL_RUN_ARGS=--label=dokku
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ parse_args deploy thumbor ''
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=("$@")
+ local args
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=2
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=3
+ for arg in '"$@"'
+ false
+ case "$arg" in
+ local next_index=4
+ return 0
+ args=("$@")
+ [[ deploy =~ ^--.* ]]
+ has_tty
+ declare 'desc=return 0 if we have a tty'
++ /usr/bin/tty
+ [[ /dev/pts/0 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
++ id -un
+ [[ dokku != \r\o\o\t ]]
+ [[ deploy =~ ^plugin:.* ]]
+ [[ -n '' ]]
+ dokku_auth deploy thumbor ''
+ declare 'desc=calls user-auth plugin trigger'
+ export SSH_USER=root
+ SSH_USER=root
+ export SSH_NAME=default
+ SSH_NAME=default
+ plugn trigger user-auth root default deploy thumbor ''
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
+ return 0
+ case "$1" in
+ execute_dokku_cmd deploy thumbor ''
+ declare 'desc=executes dokku sub-commands'
+ local PLUGIN_NAME=deploy
+ local PLUGIN_CMD=deploy
+ local implemented=0
+ local script
+ argv=("$@")
+ local argv
+ case "$PLUGIN_NAME" in
+ local PLUGIN_NAME=00_dokku-standard
++ readlink -f /var/lib/dokku/plugins/enabled/00_dokku-standard
+ [[ /var/lib/dokku/core-plugins/available/00_dokku-standard == *core-plugins* ]]
+ [[ deploy == \d\e\p\l\o\y ]]
+ shift 1
+ [[ ! -z '' ]]
+ set -- deploy thumbor ''
+ [[ -x /var/lib/dokku/plugins/enabled/00_dokku-standard/subcommands/default ]]
+ [[ -x /var/lib/dokku/plugins/enabled/00_dokku-standard/subcommands/deploy ]]
+ /var/lib/dokku/plugins/enabled/00_dokku-standard/subcommands/deploy deploy thumbor ''
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ source /var/lib/dokku/plugins/available/checks/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
++ source /var/lib/dokku/plugins/available/config/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
+ source /var/lib/dokku/plugins/available/config/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+ source /var/lib/dokku/core-plugins/available/proxy/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
++ source /var/lib/dokku/plugins/available/config/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
+ dokku_deploy_cmd deploy thumbor ''
+ declare 'desc=deploy phase'
+ local cmd=deploy
+ [[ -z thumbor ]]
+ local APP=thumbor
+ local IMAGE_TAG=
++ get_app_image_name thumbor ''
++ declare 'desc=return image identifier for a given app, tag tuple. validate if tag is presented'
++ local APP=thumbor
++ local IMAGE_TAG=
+++ get_app_image_repo thumbor
+++ declare 'desc=central definition of image repo pattern'
+++ local APP=thumbor
+++ local IMAGE_REPO=dokku/thumbor
+++ [[ -z thumbor ]]
+++ echo dokku/thumbor
++ local IMAGE_REPO=dokku/thumbor
++ [[ -z thumbor ]]
++ [[ -n '' ]]
++ local IMAGE=dokku/thumbor:latest
++ echo dokku/thumbor:latest
+ local IMAGE=dokku/thumbor:latest
+ verify_app_name thumbor
+ declare 'desc=verify app name format and app existence'
+ local APP=thumbor
+ [[ ! -n thumbor ]]
+ [[ ! thumbor =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/thumbor ]]
+ return 0
+ plugn trigger pre-deploy thumbor ''
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ source /var/lib/dokku/plugins/available/config/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+ exec_app_json_scripts thumbor ''
+ declare 'desc=core app.json scripts execution'
+ local 'trigger=/var/lib/dokku/plugins/enabled/00_dokku-standard/pre-deploy app_json_scripts'
+ local APP=thumbor
+ case "$0" in
+ local IMAGE_TAG=
++ get_app_image_name thumbor ''
++ declare 'desc=return image identifier for a given app, tag tuple. validate if tag is presented'
++ local APP=thumbor
++ local IMAGE_TAG=
+++ get_app_image_repo thumbor
+++ declare 'desc=central definition of image repo pattern'
+++ local APP=thumbor
+++ local IMAGE_REPO=dokku/thumbor
+++ [[ -z thumbor ]]
+++ echo dokku/thumbor
++ local IMAGE_REPO=dokku/thumbor
++ [[ -z thumbor ]]
++ [[ -n '' ]]
++ local IMAGE=dokku/thumbor:latest
++ echo dokku/thumbor:latest
+ local IMAGE=dokku/thumbor:latest
+ local PHASE_SCRIPT_KEY=predeploy
+ dokku_log_info1 'Attempting to run scripts.dokku.predeploy from app.json (if defined)'
+ declare 'desc=log info1 formatter'
+ echo '-----> Attempting to run scripts.dokku.predeploy from app.json (if defined)'
+ execute_script thumbor dokku/thumbor:latest predeploy
-----> Attempting to run scripts.dokku.predeploy from app.json (if defined)
+ declare 'desc=executes appropriate phase script key from app.json'
+ local APP=thumbor
+ local IMAGE=dokku/thumbor:latest
+ local PHASE_SCRIPT_KEY=predeploy
++ get_phase_script dokku/thumbor:latest predeploy
+ local SCRIPT_CMD=
+ [[ -n '' ]]
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ source /var/lib/dokku/plugins/available/ps/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
++ source /var/lib/dokku/plugins/available/config/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
+ ps_pre_deploy thumbor ''
+ declare 'desc=ps pre-deploy plugin trigger'
+ local trigger=ps_pre_deploy
+ local APP=thumbor
+ extract_procfile thumbor
+ declare 'desc=extracts procfile from app image'
+ local APP=thumbor
++ get_running_image_tag thumbor
++ declare 'desc=retrieve current image tag for a given app. returns empty string if no deployed containers are found'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
++ CIDS=($(get_app_container_ids "$APP"))
+++ get_app_container_ids thumbor
+++ declare 'desc=returns list of docker container ids for given app'
+++ local APP=thumbor
+++ local CONTAINER_TYPE=
+++ verify_app_name thumbor
+++ declare 'desc=verify app name format and app existence'
+++ local APP=thumbor
+++ [[ ! -n thumbor ]]
+++ [[ ! thumbor =~ ^[a-z].* ]]
+++ [[ ! -d /home/dokku/thumbor ]]
+++ return 0
+++ [[ -f /home/dokku/thumbor/CONTAINER ]]
+++ [[ -n '' ]]
+++ local 'CONTAINER_PATTERN=/home/dokku/thumbor/CONTAINER.*'
+++ shopt -s nullglob
+++ local DOKKU_CID_FILE
+++ for DOKKU_CID_FILE in '$CONTAINER_PATTERN'
+++ local 'DOKKU_CIDS+= '
+++ local DOKKU_CIDS+=083b306d6655691624c7fe9d592688350876eba2a5c4922673530c966c96c065
+++ local 'DOKKU_CIDS+= '
+++ shopt -u nullglob
+++ echo ' 083b306d6655691624c7fe9d592688350876eba2a5c4922673530c966c96c065 '
++ local CIDS
+++ awk -F: '{ print $2 }'
+++ docker inspect -f '{{ .Config.Image }}' 083b306d6655691624c7fe9d592688350876eba2a5c4922673530c966c96c065
++ local RUNNING_IMAGE_TAG=latest
++ echo latest
+ local IMAGE_TAG=latest
++ get_app_image_name thumbor latest
++ declare 'desc=return image identifier for a given app, tag tuple. validate if tag is presented'
++ local APP=thumbor
++ local IMAGE_TAG=latest
+++ get_app_image_repo thumbor
+++ declare 'desc=central definition of image repo pattern'
+++ local APP=thumbor
+++ local IMAGE_REPO=dokku/thumbor
+++ [[ -z thumbor ]]
+++ echo dokku/thumbor
++ local IMAGE_REPO=dokku/thumbor
++ [[ -z thumbor ]]
++ [[ -n latest ]]
++ local IMAGE=dokku/thumbor:latest
++ verify_image dokku/thumbor:latest
++ declare 'desc=verify image existence'
++ local IMAGE=dokku/thumbor:latest
++ docker inspect dokku/thumbor:latest
++ return 0
++ echo dokku/thumbor:latest
+ local IMAGE=dokku/thumbor:latest
+ local DOKKU_PROCFILE=/home/dokku/thumbor/DOKKU_PROCFILE
+ verify_app_name thumbor
+ declare 'desc=verify app name format and app existence'
+ local APP=thumbor
+ [[ ! -n thumbor ]]
+ [[ ! thumbor =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/thumbor ]]
+ return 0
+ copy_from_image dokku/thumbor:latest Procfile /home/dokku/thumbor/DOKKU_PROCFILE
+ [[ -f /home/dokku/thumbor/DOKKU_PROCFILE ]]
+ dokku_log_info1_quiet 'No Procfile found in app image'
+ declare 'desc=log info1 formatter (with quiet option)'
+ [[ -z '' ]]
+ echo '-----> No Procfile found in app image'
+ generate_scale_file thumbor
-----> No Procfile found in app image
+ declare 'desc=generates DOKKU_SCALE file'
+ local APP=thumbor
+ local IMAGE_TAG=
++ get_app_image_name thumbor ''
++ declare 'desc=return image identifier for a given app, tag tuple. validate if tag is presented'
++ local APP=thumbor
++ local IMAGE_TAG=
+++ get_app_image_repo thumbor
+++ declare 'desc=central definition of image repo pattern'
+++ local APP=thumbor
+++ local IMAGE_REPO=dokku/thumbor
+++ [[ -z thumbor ]]
+++ echo dokku/thumbor
++ local IMAGE_REPO=dokku/thumbor
++ [[ -z thumbor ]]
++ [[ -n '' ]]
++ local IMAGE=dokku/thumbor:latest
++ echo dokku/thumbor:latest
+ local IMAGE=dokku/thumbor:latest
+ local DOKKU_SCALE_FILE=/home/dokku/thumbor/DOKKU_SCALE
+ local DOKKU_PROCFILE=/home/dokku/thumbor/DOKKU_PROCFILE
+ verify_app_name thumbor
+ declare 'desc=verify app name format and app existence'
+ local APP=thumbor
+ [[ ! -n thumbor ]]
+ [[ ! thumbor =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/thumbor ]]
+ return 0
+ copy_from_image dokku/thumbor:latest /app/DOKKU_SCALE /home/dokku/thumbor
+ [[ ! -f /home/dokku/thumbor/DOKKU_SCALE ]]
+ dokku_log_info1_quiet 'DOKKU_SCALE file found (/home/dokku/thumbor/DOKKU_SCALE)'
+ declare 'desc=log info1 formatter (with quiet option)'
+ [[ -z '' ]]
+ echo '-----> DOKKU_SCALE file found (/home/dokku/thumbor/DOKKU_SCALE)'
+ print_dokku_scale_file thumbor
-----> DOKKU_SCALE file found (/home/dokku/thumbor/DOKKU_SCALE)
+ declare 'desc=prints contents of DOKKU_SCALE file'
+ local APP=thumbor
+ local DOKKU_SCALE_FILE=/home/dokku/thumbor/DOKKU_SCALE
+ read -r line
+ dokku_log_info2_quiet web=1
+ declare 'desc=log info2 formatter (with quiet option)'
+ [[ -z '' ]]
+ echo '=====> web=1'
+ read -r line
=====> web=1
+ [[ -n '' ]]
+ is_image_herokuish_based dokku/thumbor:latest
+ declare 'desc=returns true if app image is based on herokuish'
+ [[ ! -f /home/ubuntu/.circlerc ]]
+ local DOCKER_ARGS=--rm
+ docker run --label=dokku --entrypoint=/bin/sh --rm dokku/thumbor:latest -c 'test -f /exec'
+ local DOKKU_SCALE_FILE=/home/dokku/thumbor/DOKKU_SCALE
++ get_app_container_ids thumbor
++ declare 'desc=returns list of docker container ids for given app'
++ local APP=thumbor
++ local CONTAINER_TYPE=
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
++ [[ -f /home/dokku/thumbor/CONTAINER ]]
++ [[ -n '' ]]
++ local 'CONTAINER_PATTERN=/home/dokku/thumbor/CONTAINER.*'
++ shopt -s nullglob
++ local DOKKU_CID_FILE
++ for DOKKU_CID_FILE in '$CONTAINER_PATTERN'
++ local 'DOKKU_CIDS+= '
++ local DOKKU_CIDS+=083b306d6655691624c7fe9d592688350876eba2a5c4922673530c966c96c065
++ local 'DOKKU_CIDS+= '
++ shopt -u nullglob
++ echo ' 083b306d6655691624c7fe9d592688350876eba2a5c4922673530c966c96c065 '
+ local 'oldids= 083b306d6655691624c7fe9d592688350876eba2a5c4922673530c966c96c065 '
++ plugn trigger docker-args-deploy thumbor ''
++ :
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ source /var/lib/dokku/plugins/available/config/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+ config_docker_args thumbor ''
+ declare 'desc=config docker-args plugin trigger'
+ local 'trigger=/var/lib/dokku/plugins/enabled/config/docker-args-deploy config_docker_args'
++ cat
+ local STDIN=
+ local APP=thumbor
+ local IMAGE_TAG=
++ get_app_image_name thumbor ''
++ declare 'desc=return image identifier for a given app, tag tuple. validate if tag is presented'
++ local APP=thumbor
++ local IMAGE_TAG=
+++ get_app_image_repo thumbor
+++ declare 'desc=central definition of image repo pattern'
+++ local APP=thumbor
+++ local IMAGE_REPO=dokku/thumbor
+++ [[ -z thumbor ]]
+++ echo dokku/thumbor
++ local IMAGE_REPO=dokku/thumbor
++ [[ -z thumbor ]]
++ [[ -n '' ]]
++ local IMAGE=dokku/thumbor:latest
++ echo dokku/thumbor:latest
+ local IMAGE=dokku/thumbor:latest
+ local DOCKERFILE_ENV_FILE=/home/dokku/thumbor/DOCKERFILE_ENV_FILE
+ verify_app_name thumbor
+ declare 'desc=verify app name format and app existence'
+ local APP=thumbor
+ [[ ! -n thumbor ]]
+ [[ ! thumbor =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/thumbor ]]
+ return 0
+ is_image_herokuish_based dokku/thumbor:latest
+ declare 'desc=returns true if app image is based on herokuish'
+ [[ ! -f /home/ubuntu/.circlerc ]]
+ local DOCKER_ARGS=--rm
+ docker run --label=dokku --entrypoint=/bin/sh --rm dokku/thumbor:latest -c 'test -f /exec'
+ sed -e 's:^export ::g' -e 's:='\'':=:g' -e 's:'\''$::g'
+ config_export global
+ declare 'desc=returns export command for config variable of specified type (app/global)'
+ local CONFIG_TYPE=global
+ local APP=
+ local ENV_FILE=/home/dokku//ENV
+ [[ global == \g\l\o\b\a\l ]]
+ local ENV_FILE=/home/dokku/ENV
+ [[ ! -f /home/dokku/ENV ]]
+ [[ ! -s /home/dokku/ENV ]]
+ return 0
+ sed -e 's:^export ::g' -e 's:='\'':=:g' -e 's:'\''$::g'
+ config_export app thumbor
+ declare 'desc=returns export command for config variable of specified type (app/global)'
+ local CONFIG_TYPE=app
+ local APP=thumbor
+ local ENV_FILE=/home/dokku/thumbor/ENV
+ [[ app == \g\l\o\b\a\l ]]
+ [[ ! -f /home/dokku/thumbor/ENV ]]
+ [[ ! -s /home/dokku/thumbor/ENV ]]
++ cut '-d ' -f2-
++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
+ local 'VARS=DOKKU_APP_RESTORE='\''1'\''
DOKKU_APP_TYPE='\''dockerfile'\''
DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\''
DOKKU_DOCKERFILE_PORTS='\''8080'\''
DOKKU_NGINX_PORT='\''80'\''
THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\'''
+ awk '{print "export " $0}'
+ echo 'DOKKU_APP_RESTORE='\''1'\''
DOKKU_APP_TYPE='\''dockerfile'\''
DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\''
DOKKU_DOCKERFILE_PORTS='\''8080'\''
DOKKU_NGINX_PORT='\''80'\''
THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\'''
+ return 0
+ echo -n ' --env-file=/home/dokku/thumbor/DOCKERFILE_ENV_FILE'
+ docker_args thumbor ''
+ declare 'desc=docker args plugin trigger'
+ local trigger=/var/lib/dokku/plugins/enabled/docker-options/docker-args-deploy
++ cat
+ local STDIN=
+ local APP=thumbor
+ local IMAGE_SOURCE_TYPE=
+ case "$0" in
+ local PHASE=DEPLOY
+ local FILE_PREFIX=DOCKER_OPTIONS_
+ local PHASE_FILE_PATH=/home/dokku/thumbor/DOCKER_OPTIONS_DEPLOY
+ local output=
+ [[ -f /home/dokku/thumbor/DOCKER_OPTIONS_DEPLOY ]]
+ echo -n ''
+ local 'DOKKU_DEFAULT_DOCKER_ARGS= --env-file=/home/dokku/thumbor/DOCKERFILE_ENV_FILE'
++ is_app_proxy_enabled thumbor
++ declare 'desc=return true if proxy is enabled; otherwise return false'
++ local APP=thumbor
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
++ local APP_PROXY_ENABLED=true
+++ config_get thumbor DOKKU_DISABLE_PROXY
+++ declare 'desc=get value of given config var'
+++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
+++ set -- config:get thumbor DOKKU_DISABLE_PROXY
+++ config_parse_args config:get thumbor DOKKU_DISABLE_PROXY
+++ declare 'desc=parse config plugin args'
+++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+++ for var in '"$@"'
+++ [[ config:get == \-\-\g\l\o\b\a\l ]]
+++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ config:get == \-\-\e\x\p\o\r\t ]]
+++ [[ config:get == \-\-\s\h\e\l\l ]]
+++ for var in '"$@"'
+++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
+++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
+++ [[ thumbor == \-\-\s\h\e\l\l ]]
+++ for var in '"$@"'
+++ [[ DOKKU_DISABLE_PROXY == \-\-\g\l\o\b\a\l ]]
+++ [[ DOKKU_DISABLE_PROXY == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ DOKKU_DISABLE_PROXY == \-\-\e\x\p\o\r\t ]]
+++ [[ DOKKU_DISABLE_PROXY == \-\-\s\h\e\l\l ]]
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
++++ get_sanitized_config_args config:get thumbor DOKKU_DISABLE_PROXY
++++ local 'desc=return sanitized arguments for config plugin'
++++ SANITIZED_ARGS=("$@")
++++ local SANITIZED_ARGS
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
++++ echo config:get thumbor DOKKU_DISABLE_PROXY
+++ local SANITIZED_ARGS
+++ set -- config:get thumbor DOKKU_DISABLE_PROXY
+++ DOKKU_CONFIG_TYPE=app
+++ DOKKU_CONFIG_RESTART=true
+++ [[ app == \a\p\p ]]
+++ [[ -z thumbor ]]
+++ verify_app_name thumbor
+++ declare 'desc=verify app name format and app existence'
+++ local APP=thumbor
+++ [[ ! -n thumbor ]]
+++ [[ ! thumbor =~ ^[a-z].* ]]
+++ [[ ! -d /home/dokku/thumbor ]]
+++ return 0
+++ APP=thumbor
+++ ENV_FILE=/home/dokku/thumbor/ENV
+++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
++++ get_sanitized_config_args config:get thumbor DOKKU_DISABLE_PROXY
++++ local 'desc=return sanitized arguments for config plugin'
++++ SANITIZED_ARGS=("$@")
++++ local SANITIZED_ARGS
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
++++ echo config:get thumbor DOKKU_DISABLE_PROXY
+++ local SANITIZED_ARGS
+++ set -- config:get thumbor DOKKU_DISABLE_PROXY
+++ [[ -z thumbor ]]
+++ config_create /home/dokku/thumbor/ENV
+++ declare 'desc=create config env file'
+++ local ENV_FILE=/home/dokku/thumbor/ENV
+++ [[ -f /home/dokku/thumbor/ENV ]]
+++ [[ ! -s /home/dokku/thumbor/ENV ]]
+++ local KEY=DOKKU_DISABLE_PROXY
+++ sed -e 's/^'\''//' -e 's/'\''$//'
+++ cut -d= -f2-
+++ grep '^export DOKKU_DISABLE_PROXY='
+++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
++ local DOKKU_DISABLE_PROXY=
++ [[ -n '' ]]
++ echo true
+ local DOKKU_IS_APP_PROXY_ENABLED=true
+ local line
+ local PROC_TYPE
+ local PROC_COUNT
+ local CONTAINER_INDEX
+ read -r line
+ [[ web=1 =~ ^#.* ]]
++ strip_inline_comments web=1
++ declare 'desc=removes bash-style comment from input line'
++ local line=web=1
++ local stripped_line=web=1
++ echo web=1
+ line=web=1
+ PROC_TYPE=web
+ PROC_COUNT=1
+ CONTAINER_INDEX=1
+ [[ 1 -le 1 ]]
+ local id=
+ local port=
+ local ipaddr=
+ local DOKKU_CONTAINER_ID_FILE=/home/dokku/thumbor/CONTAINER.web.1
+ local DOKKU_IP_FILE=/home/dokku/thumbor/IP.web.1
+ local DOKKU_PORT_FILE=/home/dokku/thumbor/PORT.web.1
+ local 'DOCKER_ARGS= --env-file=/home/dokku/thumbor/DOCKERFILE_ENV_FILE'
+ local 'DOCKER_ARGS+= -e DYNO='\''web.1'\'' '
+ [[ -n 1 ]]
+ local 'DOCKER_ARGS+= -e TRACE=true '
+ [[ -n '' ]]
+ [[ -z '' ]]
+ DOKKU_DOCKERFILE_PORTS=($(config_get "$APP" DOKKU_DOCKERFILE_PORTS || true))
++ config_get thumbor DOKKU_DOCKERFILE_PORTS
++ declare 'desc=get value of given config var'
++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get thumbor DOKKU_DOCKERFILE_PORTS
++ config_parse_args config:get thumbor DOKKU_DOCKERFILE_PORTS
++ declare 'desc=parse config plugin args'
++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ for var in '"$@"'
++ [[ config:get == \-\-\g\l\o\b\a\l ]]
++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ config:get == \-\-\e\x\p\o\r\t ]]
++ [[ config:get == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
++ [[ thumbor == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ DOKKU_DOCKERFILE_PORTS == \-\-\g\l\o\b\a\l ]]
++ [[ DOKKU_DOCKERFILE_PORTS == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ DOKKU_DOCKERFILE_PORTS == \-\-\e\x\p\o\r\t ]]
++ [[ DOKKU_DOCKERFILE_PORTS == \-\-\s\h\e\l\l ]]
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_DOCKERFILE_PORTS
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_DOCKERFILE_PORTS
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_DOCKERFILE_PORTS
++ DOKKU_CONFIG_TYPE=app
++ DOKKU_CONFIG_RESTART=true
++ [[ app == \a\p\p ]]
++ [[ -z thumbor ]]
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
++ APP=thumbor
++ ENV_FILE=/home/dokku/thumbor/ENV
++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_DOCKERFILE_PORTS
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_DOCKERFILE_PORTS
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_DOCKERFILE_PORTS
++ [[ -z thumbor ]]
++ config_create /home/dokku/thumbor/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/thumbor/ENV
++ [[ -f /home/dokku/thumbor/ENV ]]
++ [[ ! -s /home/dokku/thumbor/ENV ]]
++ local KEY=DOKKU_DOCKERFILE_PORTS
++ sed -e 's/^'\''//' -e 's/'\''$//'
++ cut -d= -f2-
++ grep '^export DOKKU_DOCKERFILE_PORTS='
++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
+ local DOKKU_DOCKERFILE_PORTS
++ config_get thumbor DOKKU_DOCKERFILE_START_CMD
++ declare 'desc=get value of given config var'
++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get thumbor DOKKU_DOCKERFILE_START_CMD
++ config_parse_args config:get thumbor DOKKU_DOCKERFILE_START_CMD
++ declare 'desc=parse config plugin args'
++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ for var in '"$@"'
++ [[ config:get == \-\-\g\l\o\b\a\l ]]
++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ config:get == \-\-\e\x\p\o\r\t ]]
++ [[ config:get == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
++ [[ thumbor == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ DOKKU_DOCKERFILE_START_CMD == \-\-\g\l\o\b\a\l ]]
++ [[ DOKKU_DOCKERFILE_START_CMD == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ DOKKU_DOCKERFILE_START_CMD == \-\-\e\x\p\o\r\t ]]
++ [[ DOKKU_DOCKERFILE_START_CMD == \-\-\s\h\e\l\l ]]
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_DOCKERFILE_START_CMD
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_DOCKERFILE_START_CMD
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_DOCKERFILE_START_CMD
++ DOKKU_CONFIG_TYPE=app
++ DOKKU_CONFIG_RESTART=true
++ [[ app == \a\p\p ]]
++ [[ -z thumbor ]]
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
++ APP=thumbor
++ ENV_FILE=/home/dokku/thumbor/ENV
++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_DOCKERFILE_START_CMD
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_DOCKERFILE_START_CMD
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_DOCKERFILE_START_CMD
++ [[ -z thumbor ]]
++ config_create /home/dokku/thumbor/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/thumbor/ENV
++ [[ -f /home/dokku/thumbor/ENV ]]
++ [[ ! -s /home/dokku/thumbor/ENV ]]
++ local KEY=DOKKU_DOCKERFILE_START_CMD
++ sed -e 's/^'\''//' -e 's/'\''$//'
++ cut -d= -f2-
++ grep '^export DOKKU_DOCKERFILE_START_CMD='
++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
++ true
+ local DOKKU_DOCKERFILE_START_CMD=
++ get_cmd_from_procfile thumbor web
++ declare 'desc=parse cmd from app Procfile'
++ local APP=thumbor
++ local PROC_TYPE=web
++ local DOKKU_PROCFILE=/home/dokku/thumbor/DOKKU_PROCFILE
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
++ [[ -f /home/dokku/thumbor/DOKKU_PROCFILE ]]
+ local DOKKU_PROCFILE_START_CMD=
+ local START_CMD=
+ [[ web == \w\e\b ]]
+ [[ -z 8080 ]]
+ local p
+ for p in '${DOKKU_DOCKERFILE_PORTS[*]}'
+ [[ ! 8080 =~ .*udp.* ]]
+ local p=8080
+ local port=8080
+ local 'DOKKU_DOCKER_PORT_ARGS+= -p 8080 '
+ [[ true == \t\r\u\e ]]
++ docker run --label=dokku -d -e PORT=8080 --env-file=/home/dokku/thumbor/DOCKERFILE_ENV_FILE -e 'DYNO='\''web.1'\''' -e TRACE=true dokku/thumbor:latest
+ local id=cac2eb1f0fb87502ed620f540408a8425f286388bc101122928bb7c0fd2f6501
++ docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' cac2eb1f0fb87502ed620f540408a8425f286388bc101122928bb7c0fd2f6501
+ local ipaddr=172.17.0.2
+ [[ -z 172.17.0.2 ]]
++ is_app_checks_enabled thumbor
++ declare 'desc=return app zero-downtime checks status'
++ local APP=thumbor
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
+++ config_get thumbor DOKKU_CHECKS_ENABLED
+++ declare 'desc=get value of given config var'
+++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
+++ set -- config:get thumbor DOKKU_CHECKS_ENABLED
+++ config_parse_args config:get thumbor DOKKU_CHECKS_ENABLED
+++ declare 'desc=parse config plugin args'
+++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+++ for var in '"$@"'
+++ [[ config:get == \-\-\g\l\o\b\a\l ]]
+++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ config:get == \-\-\e\x\p\o\r\t ]]
+++ [[ config:get == \-\-\s\h\e\l\l ]]
+++ for var in '"$@"'
+++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
+++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
+++ [[ thumbor == \-\-\s\h\e\l\l ]]
+++ for var in '"$@"'
+++ [[ DOKKU_CHECKS_ENABLED == \-\-\g\l\o\b\a\l ]]
+++ [[ DOKKU_CHECKS_ENABLED == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ DOKKU_CHECKS_ENABLED == \-\-\e\x\p\o\r\t ]]
+++ [[ DOKKU_CHECKS_ENABLED == \-\-\s\h\e\l\l ]]
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
++++ get_sanitized_config_args config:get thumbor DOKKU_CHECKS_ENABLED
++++ local 'desc=return sanitized arguments for config plugin'
++++ SANITIZED_ARGS=("$@")
++++ local SANITIZED_ARGS
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
++++ echo config:get thumbor DOKKU_CHECKS_ENABLED
+++ local SANITIZED_ARGS
+++ set -- config:get thumbor DOKKU_CHECKS_ENABLED
+++ DOKKU_CONFIG_TYPE=app
+++ DOKKU_CONFIG_RESTART=true
+++ [[ app == \a\p\p ]]
+++ [[ -z thumbor ]]
+++ verify_app_name thumbor
+++ declare 'desc=verify app name format and app existence'
+++ local APP=thumbor
+++ [[ ! -n thumbor ]]
+++ [[ ! thumbor =~ ^[a-z].* ]]
+++ [[ ! -d /home/dokku/thumbor ]]
+++ return 0
+++ APP=thumbor
+++ ENV_FILE=/home/dokku/thumbor/ENV
+++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
++++ get_sanitized_config_args config:get thumbor DOKKU_CHECKS_ENABLED
++++ local 'desc=return sanitized arguments for config plugin'
++++ SANITIZED_ARGS=("$@")
++++ local SANITIZED_ARGS
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
++++ echo config:get thumbor DOKKU_CHECKS_ENABLED
+++ local SANITIZED_ARGS
+++ set -- config:get thumbor DOKKU_CHECKS_ENABLED
+++ [[ -z thumbor ]]
+++ config_create /home/dokku/thumbor/ENV
+++ declare 'desc=create config env file'
+++ local ENV_FILE=/home/dokku/thumbor/ENV
+++ [[ -f /home/dokku/thumbor/ENV ]]
+++ [[ ! -s /home/dokku/thumbor/ENV ]]
+++ local KEY=DOKKU_CHECKS_ENABLED
+++ sed -e 's/^'\''//' -e 's/'\''$//'
+++ cut -d= -f2-
+++ grep '^export DOKKU_CHECKS_ENABLED='
+++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
++ local DOKKU_CHECKS_ENABLED=
++ [[ -z '' ]]
++ local status=true
++ echo true
+ [[ true == \f\a\l\s\e ]]
+ trap 'kill_new $id' INT TERM EXIT
+ dokku_log_info1 'Running pre-flight checks'
+ declare 'desc=log info1 formatter'
+ echo '-----> Running pre-flight checks'
+ plugn trigger check-deploy thumbor cac2eb1f0fb87502ed620f540408a8425f286388bc101122928bb7c0fd2f6501 web 8080 172.17.0.2
-----> Running pre-flight checks
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ source /var/lib/dokku/plugins/available/checks/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
++ source /var/lib/dokku/plugins/available/config/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
+ source /var/lib/dokku/plugins/available/config/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+ checks_check_deploy thumbor cac2eb1f0fb87502ed620f540408a8425f286388bc101122928bb7c0fd2f6501 web 8080 172.17.0.2
+ declare 'desc=checks check-deploy plugin trigger'
+ local trigger=checks_check_deploy
+ local APP=thumbor
+ local DOKKU_APP_CONTAINER_ID=cac2eb1f0fb87502ed620f540408a8425f286388bc101122928bb7c0fd2f6501
+ local DOKKU_APP_CONTAINER_TYPE=web
+ local DOKKU_APP_LISTEN_PORT=8080
+ local DOKKU_APP_LISTEN_IP=172.17.0.2
+ [[ -z 8080 ]]
+ [[ -z 172.17.0.2 ]]
+ [[ -z cac2eb1f0fb87502ed620f540408a8425f286388bc101122928bb7c0fd2f6501 ]]
++ config_export global
++ declare 'desc=returns export command for config variable of specified type (app/global)'
++ local CONFIG_TYPE=global
++ local APP=
++ local ENV_FILE=/home/dokku//ENV
++ [[ global == \g\l\o\b\a\l ]]
++ local ENV_FILE=/home/dokku/ENV
++ [[ ! -f /home/dokku/ENV ]]
++ [[ ! -s /home/dokku/ENV ]]
++ return 0
+ eval ''
++ config_export app thumbor
++ declare 'desc=returns export command for config variable of specified type (app/global)'
++ local CONFIG_TYPE=app
++ local APP=thumbor
++ local ENV_FILE=/home/dokku/thumbor/ENV
++ [[ app == \g\l\o\b\a\l ]]
++ [[ ! -f /home/dokku/thumbor/ENV ]]
++ [[ ! -s /home/dokku/thumbor/ENV ]]
+++ cut '-d ' -f2-
+++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
++ local 'VARS=DOKKU_APP_RESTORE='\''1'\''
DOKKU_APP_TYPE='\''dockerfile'\''
DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\''
DOKKU_DOCKERFILE_PORTS='\''8080'\''
DOKKU_NGINX_PORT='\''80'\''
THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\'''
++ awk '{print "export " $0}'
++ echo 'DOKKU_APP_RESTORE='\''1'\''
DOKKU_APP_TYPE='\''dockerfile'\''
DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\''
DOKKU_DOCKERFILE_PORTS='\''8080'\''
DOKKU_NGINX_PORT='\''80'\''
THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\'''
++ return 0
+ eval 'export DOKKU_APP_RESTORE='\''1'\''
export DOKKU_APP_TYPE='\''dockerfile'\''
export DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\''
export DOKKU_DOCKERFILE_PORTS='\''8080'\''
export DOKKU_NGINX_PORT='\''80'\''
export THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\'''
++ export DOKKU_APP_RESTORE=1
++ DOKKU_APP_RESTORE=1
++ export DOKKU_APP_TYPE=dockerfile
++ DOKKU_APP_TYPE=dockerfile
++ export 'DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf'
++ DOKKU_DOCKERFILE_CMD='CMD thumbor -p $PORT -c thumbor.conf'
++ export DOKKU_DOCKERFILE_PORTS=8080
++ DOKKU_DOCKERFILE_PORTS=8080
++ export DOKKU_NGINX_PORT=80
++ DOKKU_NGINX_PORT=80
++ export 'THUMBOR_SECURITY_KEY=lkjf78ddqqsd!'
++ THUMBOR_SECURITY_KEY='lkjf78ddqqsd!'
++ is_app_checks_enabled thumbor
++ declare 'desc=return app zero-downtime checks status'
++ local APP=thumbor
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
+++ config_get thumbor DOKKU_CHECKS_ENABLED
+++ declare 'desc=get value of given config var'
+++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
+++ set -- config:get thumbor DOKKU_CHECKS_ENABLED
+++ config_parse_args config:get thumbor DOKKU_CHECKS_ENABLED
+++ declare 'desc=parse config plugin args'
+++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+++ for var in '"$@"'
+++ [[ config:get == \-\-\g\l\o\b\a\l ]]
+++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ config:get == \-\-\e\x\p\o\r\t ]]
+++ [[ config:get == \-\-\s\h\e\l\l ]]
+++ for var in '"$@"'
+++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
+++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
+++ [[ thumbor == \-\-\s\h\e\l\l ]]
+++ for var in '"$@"'
+++ [[ DOKKU_CHECKS_ENABLED == \-\-\g\l\o\b\a\l ]]
+++ [[ DOKKU_CHECKS_ENABLED == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ DOKKU_CHECKS_ENABLED == \-\-\e\x\p\o\r\t ]]
+++ [[ DOKKU_CHECKS_ENABLED == \-\-\s\h\e\l\l ]]
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
++++ get_sanitized_config_args config:get thumbor DOKKU_CHECKS_ENABLED
++++ local 'desc=return sanitized arguments for config plugin'
++++ SANITIZED_ARGS=("$@")
++++ local SANITIZED_ARGS
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
++++ echo config:get thumbor DOKKU_CHECKS_ENABLED
+++ local SANITIZED_ARGS
+++ set -- config:get thumbor DOKKU_CHECKS_ENABLED
+++ DOKKU_CONFIG_TYPE=app
+++ DOKKU_CONFIG_RESTART=true
+++ [[ app == \a\p\p ]]
+++ [[ -z thumbor ]]
+++ verify_app_name thumbor
+++ declare 'desc=verify app name format and app existence'
+++ local APP=thumbor
+++ [[ ! -n thumbor ]]
+++ [[ ! thumbor =~ ^[a-z].* ]]
+++ [[ ! -d /home/dokku/thumbor ]]
+++ return 0
+++ APP=thumbor
+++ ENV_FILE=/home/dokku/thumbor/ENV
+++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
++++ get_sanitized_config_args config:get thumbor DOKKU_CHECKS_ENABLED
++++ local 'desc=return sanitized arguments for config plugin'
++++ SANITIZED_ARGS=("$@")
++++ local SANITIZED_ARGS
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
++++ echo config:get thumbor DOKKU_CHECKS_ENABLED
+++ local SANITIZED_ARGS
+++ set -- config:get thumbor DOKKU_CHECKS_ENABLED
+++ [[ -z thumbor ]]
+++ config_create /home/dokku/thumbor/ENV
+++ declare 'desc=create config env file'
+++ local ENV_FILE=/home/dokku/thumbor/ENV
+++ [[ -f /home/dokku/thumbor/ENV ]]
+++ [[ ! -s /home/dokku/thumbor/ENV ]]
+++ local KEY=DOKKU_CHECKS_ENABLED
+++ sed -e 's/^'\''//' -e 's/'\''$//'
+++ cut -d= -f2-
+++ grep '^export DOKKU_CHECKS_ENABLED='
+++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
++ local DOKKU_CHECKS_ENABLED=
++ [[ -z '' ]]
++ local status=true
++ echo true
+ [[ true == \f\a\l\s\e ]]
+ local WAIT=5
+ local TIMEOUT=30
+ local ATTEMPTS=5
++ mktemp -d /tmp/dokku_CHECKS.XXXXX
+ local CHECK_DEPLOY_TMP_WORK_DIR=/tmp/dokku_CHECKS.b5ff0
+ docker cp cac2eb1f0fb87502ed620f540408a8425f286388bc101122928bb7c0fd2f6501:/app/CHECKS /tmp/dokku_CHECKS.b5ff0
+ true
+ local FILENAME=/tmp/dokku_CHECKS.b5ff0/CHECKS
+ trap 'checks_check_deploy_cleanup $DOKKU_APP_CONTAINER_ID' RETURN INT TERM EXIT
+ [[ ! -s /tmp/dokku_CHECKS.b5ff0/CHECKS ]]
+ [[ web == \w\e\b ]]
+ dokku_log_verbose 'For more efficient zero downtime deployments, create a file CHECKS.'
+ declare 'desc=log verbose formatter'
+ echo ' For more efficient zero downtime deployments, create a file CHECKS.'
+ dokku_log_verbose 'See http://dokku.viewdocs.io/dokku/checks-examples.md for examples'
For more efficient zero downtime deployments, create a file CHECKS.
+ declare 'desc=log verbose formatter'
+ echo ' See http://dokku.viewdocs.io/dokku/checks-examples.md for examples'
+ dokku_log_verbose 'CHECKS file not found in container: Running simple container check...'
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
+ declare 'desc=log verbose formatter'
+ echo ' CHECKS file not found in container: Running simple container check...'
+ rm -rf /tmp/dokku_CHECKS.b5ff0
CHECKS file not found in container: Running simple container check...
+ local DOKKU_DEFAULT_CHECKS_WAIT=10
+ dokku_log_info1 'Waiting for 10 seconds ...'
+ declare 'desc=log info1 formatter'
+ echo '-----> Waiting for 10 seconds ...'
+ sleep 10
-----> Waiting for 10 seconds ...
+ is_container_running cac2eb1f0fb87502ed620f540408a8425f286388bc101122928bb7c0fd2f6501
+ declare 'desc=return 0 if given docker container id is in running state'
+ local CID=cac2eb1f0fb87502ed620f540408a8425f286388bc101122928bb7c0fd2f6501
++ docker inspect -f '{{.State.Running}}' cac2eb1f0fb87502ed620f540408a8425f286388bc101122928bb7c0fd2f6501
+ local CONTAINER_STATUS=true
+ [[ true == \t\r\u\e ]]
+ return 0
++ docker inspect -f '{{ .RestartCount }}' cac2eb1f0fb87502ed620f540408a8425f286388bc101122928bb7c0fd2f6501
+ local container_restarts=0
+ [[ 0 -ne 0 ]]
+ trap - EXIT
+ dokku_log_info1 'Default container check successful!'
+ declare 'desc=log info1 formatter'
+ echo '-----> Default container check successful!'
+ exit 0
-----> Default container check successful!
+ trap - INT TERM EXIT
+ [[ -n cac2eb1f0fb87502ed620f540408a8425f286388bc101122928bb7c0fd2f6501 ]]
+ echo cac2eb1f0fb87502ed620f540408a8425f286388bc101122928bb7c0fd2f6501
+ [[ -n 172.17.0.2 ]]
+ echo 172.17.0.2
+ [[ -n 8080 ]]
+ echo 8080
+ rm -f /home/dokku/thumbor/CONTAINER /home/dokku/thumbor/IP /home/dokku/thumbor/PORT
+ local CONTAINER_INDEX=2
+ [[ 2 -le 1 ]]
+ [[ 1 == 0 ]]
+ local CONTAINER_IDX_OFFSET=2
+ local container_state_filetype
+ for container_state_filetype in CONTAINER IP PORT
+ cd /home/dokku/thumbor
+ xargs rm -f
+ tail -n +2
+ sort -t . -k 3 -n
+ find . -maxdepth 1 -name 'CONTAINER.web.*' -printf '%f\n'
+ for container_state_filetype in CONTAINER IP PORT
+ cd /home/dokku/thumbor
+ xargs rm -f
+ tail -n +2
+ sort -t . -k 3 -n
+ find . -maxdepth 1 -name 'IP.web.*' -printf '%f\n'
+ for container_state_filetype in CONTAINER IP PORT
+ cd /home/dokku/thumbor
+ xargs rm -f
+ tail -n +2
+ sort -t . -k 3 -n
+ find . -maxdepth 1 -name 'PORT.web.*' -printf '%f\n'
+ read -r line
+ [[ -n '' ]]
+ dokku_log_info1 'Running post-deploy'
+ declare 'desc=log info1 formatter'
+ echo '-----> Running post-deploy'
+ plugn trigger post-deploy thumbor 8080 172.17.0.2 ''
-----> Running post-deploy
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ source /var/lib/dokku/plugins/available/config/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+ exec_app_json_scripts thumbor 8080 172.17.0.2 ''
+ declare 'desc=core app.json scripts execution'
+ local 'trigger=/var/lib/dokku/plugins/enabled/00_dokku-standard/post-deploy app_json_scripts'
+ local APP=thumbor
+ case "$0" in
+ local IMAGE_TAG=
++ get_app_image_name thumbor ''
++ declare 'desc=return image identifier for a given app, tag tuple. validate if tag is presented'
++ local APP=thumbor
++ local IMAGE_TAG=
+++ get_app_image_repo thumbor
+++ declare 'desc=central definition of image repo pattern'
+++ local APP=thumbor
+++ local IMAGE_REPO=dokku/thumbor
+++ [[ -z thumbor ]]
+++ echo dokku/thumbor
++ local IMAGE_REPO=dokku/thumbor
++ [[ -z thumbor ]]
++ [[ -n '' ]]
++ local IMAGE=dokku/thumbor:latest
++ echo dokku/thumbor:latest
+ local IMAGE=dokku/thumbor:latest
+ local PHASE_SCRIPT_KEY=postdeploy
+ dokku_log_info1 'Attempting to run scripts.dokku.postdeploy from app.json (if defined)'
+ declare 'desc=log info1 formatter'
+ echo '-----> Attempting to run scripts.dokku.postdeploy from app.json (if defined)'
+ execute_script thumbor dokku/thumbor:latest postdeploy
-----> Attempting to run scripts.dokku.postdeploy from app.json (if defined)
+ declare 'desc=executes appropriate phase script key from app.json'
+ local APP=thumbor
+ local IMAGE=dokku/thumbor:latest
+ local PHASE_SCRIPT_KEY=postdeploy
++ get_phase_script dokku/thumbor:latest postdeploy
+ local SCRIPT_CMD=
+ [[ -n '' ]]
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ named_containers_post_deploy thumbor 8080 172.17.0.2 ''
+ declare 'desc=names deployed app container is consistent manner'
+ local trigger=named_containers_post_deploy
+ local APP=thumbor
+ local APP_ROOT=/home/dokku/thumbor
++ stat -t /home/dokku/thumbor/CONTAINER.web.1
+ [[ -z /home/dokku/thumbor/CONTAINER.web.1 65 8 81b4 1000 1000 fd01 1199993 1 0 0 1464885429 1464885728 1464885728 0 4096 ]]
+ local container
+ for container in '"$APP_ROOT"/CONTAINER.*'
++ sed -r 's/.*CONTAINER\.(.*)/\1/'
++ echo /home/dokku/thumbor/CONTAINER.web.1
+ local DYNO=web.1
+ local NAME=thumbor.web.1
+ local CURRENT_CONTAINER_ID=cac2eb1f0fb87502ed620f540408a8425f286388bc101122928bb7c0fd2f6501
++ xargs
++ docker ps -a -q -f 'name=^.?thumbor.web.1$'
+ local PREVIOUS_CIDS=083b306d6655
+ [[ -n 083b306d6655 ]]
+ dokku_log_info1_quiet 'Found previous container(s) (083b306d6655) named thumbor.web.1'
+ declare 'desc=log info1 formatter (with quiet option)'
+ [[ -z '' ]]
+ echo '-----> Found previous container(s) (083b306d6655) named thumbor.web.1'
+ local cid
-----> Found previous container(s) (083b306d6655) named thumbor.web.1
+ for cid in '$PREVIOUS_CIDS'
++ docker inspect -f '{{.State.Status}}' 083b306d6655
+ local PREVIOUS_CONTAINER_STATUS=running
+ [[ running != \d\e\a\d ]]
++ date +%s
+ local CONTAINER_DATE_NAME=thumbor.web.1.1464885729
+ dokku_log_info2_quiet 'renaming container (083b306d6655) thumbor.web.1 to thumbor.web.1.1464885729'
+ declare 'desc=log info2 formatter (with quiet option)'
+ [[ -z '' ]]
+ echo '=====> renaming container (083b306d6655) thumbor.web.1 to thumbor.web.1.1464885729'
+ docker rename thumbor.web.1 thumbor.web.1.1464885729
=====> renaming container (083b306d6655) thumbor.web.1 to thumbor.web.1.1464885729
++ cat /home/dokku/thumbor/CONTAINER.web.1
+ local ID=cac2eb1f0fb87502ed620f540408a8425f286388bc101122928bb7c0fd2f6501
++ tr -d /
++ docker inspect -f '{{.Name}}' cac2eb1f0fb87502ed620f540408a8425f286388bc101122928bb7c0fd2f6501
+ local CURRENT_NAME=condescending_goodall
+ dokku_log_info2_quiet 'renaming container (cac2eb1f0fb8) condescending_goodall to thumbor.web.1'
+ declare 'desc=log info2 formatter (with quiet option)'
+ [[ -z '' ]]
+ echo '=====> renaming container (cac2eb1f0fb8) condescending_goodall to thumbor.web.1'
+ docker rename condescending_goodall thumbor.web.1
=====> renaming container (cac2eb1f0fb8) condescending_goodall to thumbor.web.1
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ source /var/lib/dokku/plugins/available/domains/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+ source /var/lib/dokku/plugins/available/nginx-vhosts/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
++ source /var/lib/dokku/plugins/available/certs/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
++ source /var/lib/dokku/plugins/available/config/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
++ source /var/lib/dokku/plugins/available/domains/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
++ source /var/lib/dokku/plugins/available/ps/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
+++ source /var/lib/dokku/plugins/available/config/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
++++ source /var/lib/dokku/core-plugins/available/common/functions
+++++ set -eo pipefail
+++++ [[ -n 1 ]]
+++++ set -x
+ source /var/lib/dokku/plugins/available/proxy/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
++ source /var/lib/dokku/plugins/available/config/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
++ get_app_proxy_type thumbor
++ declare 'desc=return app proxy type'
++ local APP=thumbor
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
++ local APP_PROXY_TYPE=nginx
++ echo nginx
+ [[ nginx == \n\g\i\n\x ]]
+ nginx_post_deploy thumbor 8080 172.17.0.2 ''
+ declare 'desc=nginx-vhosts post-deploy plugin trigger'
+ local trigger=nginx_post_deploy
+ local APP=thumbor
+ [[ -f /home/dokku/thumbor/IP.web.1 ]]
+ [[ -f /home/dokku/thumbor/PORT.web.1 ]]
++ is_app_vhost_enabled thumbor
++ declare 'desc=returns true or false if vhost support is enabled for a given application'
++ source /var/lib/dokku/plugins/available/config/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
++ local APP=thumbor
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
+++ config_get thumbor NO_VHOST
+++ declare 'desc=get value of given config var'
+++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
+++ set -- config:get thumbor NO_VHOST
+++ config_parse_args config:get thumbor NO_VHOST
+++ declare 'desc=parse config plugin args'
+++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+++ for var in '"$@"'
+++ [[ config:get == \-\-\g\l\o\b\a\l ]]
+++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ config:get == \-\-\e\x\p\o\r\t ]]
+++ [[ config:get == \-\-\s\h\e\l\l ]]
+++ for var in '"$@"'
+++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
+++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
+++ [[ thumbor == \-\-\s\h\e\l\l ]]
+++ for var in '"$@"'
+++ [[ NO_VHOST == \-\-\g\l\o\b\a\l ]]
+++ [[ NO_VHOST == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ NO_VHOST == \-\-\e\x\p\o\r\t ]]
+++ [[ NO_VHOST == \-\-\s\h\e\l\l ]]
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
++++ get_sanitized_config_args config:get thumbor NO_VHOST
++++ local 'desc=return sanitized arguments for config plugin'
++++ SANITIZED_ARGS=("$@")
++++ local SANITIZED_ARGS
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
++++ echo config:get thumbor NO_VHOST
+++ local SANITIZED_ARGS
+++ set -- config:get thumbor NO_VHOST
+++ DOKKU_CONFIG_TYPE=app
+++ DOKKU_CONFIG_RESTART=true
+++ [[ app == \a\p\p ]]
+++ [[ -z thumbor ]]
+++ verify_app_name thumbor
+++ declare 'desc=verify app name format and app existence'
+++ local APP=thumbor
+++ [[ ! -n thumbor ]]
+++ [[ ! thumbor =~ ^[a-z].* ]]
+++ [[ ! -d /home/dokku/thumbor ]]
+++ return 0
+++ APP=thumbor
+++ ENV_FILE=/home/dokku/thumbor/ENV
+++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
++++ get_sanitized_config_args config:get thumbor NO_VHOST
++++ local 'desc=return sanitized arguments for config plugin'
++++ SANITIZED_ARGS=("$@")
++++ local SANITIZED_ARGS
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
++++ echo config:get thumbor NO_VHOST
+++ local SANITIZED_ARGS
+++ set -- config:get thumbor NO_VHOST
+++ [[ -z thumbor ]]
+++ config_create /home/dokku/thumbor/ENV
+++ declare 'desc=create config env file'
+++ local ENV_FILE=/home/dokku/thumbor/ENV
+++ [[ -f /home/dokku/thumbor/ENV ]]
+++ [[ ! -s /home/dokku/thumbor/ENV ]]
+++ local KEY=NO_VHOST
+++ sed -e 's/^'\''//' -e 's/'\''$//'
+++ cut -d= -f2-
+++ grep '^export NO_VHOST='
+++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
++ local NO_VHOST=
++ local APP_VHOST_ENABLED=true
++ [[ '' == \1 ]]
++ echo true
+ [[ true == \f\a\l\s\e ]]
+ [[ ! -f /home/dokku/thumbor/VHOST ]]
+ nginx_build_config thumbor
+ declare 'desc=build nginx config to proxy app containers using sigil'
+ local APP=thumbor
+ verify_app_name thumbor
+ declare 'desc=verify app name format and app existence'
+ local APP=thumbor
+ [[ ! -n thumbor ]]
+ [[ ! thumbor =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/thumbor ]]
+ return 0
+ local DOKKU_APP_LISTEN_PORT=
+ local DOKKU_APP_LISTEN_IP=
+ local VHOST_PATH=/home/dokku/thumbor/VHOST
+ local URLS_PATH=/home/dokku/thumbor/URLS
+ local NGINX_TEMPLATE_NAME=nginx.conf.sigil
+ local DEFAULT_NGINX_TEMPLATE=/var/lib/dokku/plugins/available/nginx-vhosts/templates/nginx.conf.sigil
+ local NGINX_TEMPLATE=/var/lib/dokku/plugins/available/nginx-vhosts/templates/nginx.conf.sigil
+ local SCHEME=http
+ local NGINX_TEMPLATE_SOURCE=built-in
+ local APP_SSL_PATH=/home/dokku/thumbor/tls
++ get_app_raw_tcp_ports thumbor
++ declare 'desc=extracts raw tcp port numbers from DOCKERFILE_PORTS config variable'
++ source /var/lib/dokku/plugins/available/config/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
++ local APP=thumbor
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
+++ config_get thumbor DOKKU_DOCKERFILE_PORTS
+++ declare 'desc=get value of given config var'
+++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
+++ set -- config:get thumbor DOKKU_DOCKERFILE_PORTS
+++ config_parse_args config:get thumbor DOKKU_DOCKERFILE_PORTS
+++ declare 'desc=parse config plugin args'
+++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+++ for var in '"$@"'
+++ [[ config:get == \-\-\g\l\o\b\a\l ]]
+++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ config:get == \-\-\e\x\p\o\r\t ]]
+++ [[ config:get == \-\-\s\h\e\l\l ]]
+++ for var in '"$@"'
+++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
+++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
+++ [[ thumbor == \-\-\s\h\e\l\l ]]
+++ for var in '"$@"'
+++ [[ DOKKU_DOCKERFILE_PORTS == \-\-\g\l\o\b\a\l ]]
+++ [[ DOKKU_DOCKERFILE_PORTS == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ DOKKU_DOCKERFILE_PORTS == \-\-\e\x\p\o\r\t ]]
+++ [[ DOKKU_DOCKERFILE_PORTS == \-\-\s\h\e\l\l ]]
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
++++ get_sanitized_config_args config:get thumbor DOKKU_DOCKERFILE_PORTS
++++ local 'desc=return sanitized arguments for config plugin'
++++ SANITIZED_ARGS=("$@")
++++ local SANITIZED_ARGS
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
++++ echo config:get thumbor DOKKU_DOCKERFILE_PORTS
+++ local SANITIZED_ARGS
+++ set -- config:get thumbor DOKKU_DOCKERFILE_PORTS
+++ DOKKU_CONFIG_TYPE=app
+++ DOKKU_CONFIG_RESTART=true
+++ [[ app == \a\p\p ]]
+++ [[ -z thumbor ]]
+++ verify_app_name thumbor
+++ declare 'desc=verify app name format and app existence'
+++ local APP=thumbor
+++ [[ ! -n thumbor ]]
+++ [[ ! thumbor =~ ^[a-z].* ]]
+++ [[ ! -d /home/dokku/thumbor ]]
+++ return 0
+++ APP=thumbor
+++ ENV_FILE=/home/dokku/thumbor/ENV
+++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
++++ get_sanitized_config_args config:get thumbor DOKKU_DOCKERFILE_PORTS
++++ local 'desc=return sanitized arguments for config plugin'
++++ SANITIZED_ARGS=("$@")
++++ local SANITIZED_ARGS
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
++++ echo config:get thumbor DOKKU_DOCKERFILE_PORTS
+++ local SANITIZED_ARGS
+++ set -- config:get thumbor DOKKU_DOCKERFILE_PORTS
+++ [[ -z thumbor ]]
+++ config_create /home/dokku/thumbor/ENV
+++ declare 'desc=create config env file'
+++ local ENV_FILE=/home/dokku/thumbor/ENV
+++ [[ -f /home/dokku/thumbor/ENV ]]
+++ [[ ! -s /home/dokku/thumbor/ENV ]]
+++ local KEY=DOKKU_DOCKERFILE_PORTS
+++ sed -e 's/^'\''//' -e 's/'\''$//'
+++ cut -d= -f2-
+++ grep '^export DOKKU_DOCKERFILE_PORTS='
+++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
++ local DOCKERFILE_PORTS=8080
++ for p in '$DOCKERFILE_PORTS'
++ [[ ! 8080 =~ .*udp.* ]]
++ p=8080
++ raw_tcp_ports+='8080 '
+++ xargs
+++ echo '8080 '
++ local raw_tcp_ports=8080
++ echo 8080
+ local RAW_TCP_PORTS=8080
++ config_get thumbor DOKKU_DISABLE_PROXY
++ declare 'desc=get value of given config var'
++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get thumbor DOKKU_DISABLE_PROXY
++ config_parse_args config:get thumbor DOKKU_DISABLE_PROXY
++ declare 'desc=parse config plugin args'
++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ for var in '"$@"'
++ [[ config:get == \-\-\g\l\o\b\a\l ]]
++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ config:get == \-\-\e\x\p\o\r\t ]]
++ [[ config:get == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
++ [[ thumbor == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ DOKKU_DISABLE_PROXY == \-\-\g\l\o\b\a\l ]]
++ [[ DOKKU_DISABLE_PROXY == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ DOKKU_DISABLE_PROXY == \-\-\e\x\p\o\r\t ]]
++ [[ DOKKU_DISABLE_PROXY == \-\-\s\h\e\l\l ]]
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_DISABLE_PROXY
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_DISABLE_PROXY
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_DISABLE_PROXY
++ DOKKU_CONFIG_TYPE=app
++ DOKKU_CONFIG_RESTART=true
++ [[ app == \a\p\p ]]
++ [[ -z thumbor ]]
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
++ APP=thumbor
++ ENV_FILE=/home/dokku/thumbor/ENV
++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_DISABLE_PROXY
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_DISABLE_PROXY
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_DISABLE_PROXY
++ [[ -z thumbor ]]
++ config_create /home/dokku/thumbor/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/thumbor/ENV
++ [[ -f /home/dokku/thumbor/ENV ]]
++ [[ ! -s /home/dokku/thumbor/ENV ]]
++ local KEY=DOKKU_DISABLE_PROXY
++ sed -e 's/^'\''//' -e 's/'\''$//'
++ cut -d= -f2-
++ grep '^export DOKKU_DISABLE_PROXY='
++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
+ local DOKKU_DISABLE_PROXY=
++ is_app_vhost_enabled thumbor
++ declare 'desc=returns true or false if vhost support is enabled for a given application'
++ source /var/lib/dokku/plugins/available/config/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
++ local APP=thumbor
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
+++ config_get thumbor NO_VHOST
+++ declare 'desc=get value of given config var'
+++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
+++ set -- config:get thumbor NO_VHOST
+++ config_parse_args config:get thumbor NO_VHOST
+++ declare 'desc=parse config plugin args'
+++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+++ for var in '"$@"'
+++ [[ config:get == \-\-\g\l\o\b\a\l ]]
+++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ config:get == \-\-\e\x\p\o\r\t ]]
+++ [[ config:get == \-\-\s\h\e\l\l ]]
+++ for var in '"$@"'
+++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
+++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
+++ [[ thumbor == \-\-\s\h\e\l\l ]]
+++ for var in '"$@"'
+++ [[ NO_VHOST == \-\-\g\l\o\b\a\l ]]
+++ [[ NO_VHOST == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ NO_VHOST == \-\-\e\x\p\o\r\t ]]
+++ [[ NO_VHOST == \-\-\s\h\e\l\l ]]
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
++++ get_sanitized_config_args config:get thumbor NO_VHOST
++++ local 'desc=return sanitized arguments for config plugin'
++++ SANITIZED_ARGS=("$@")
++++ local SANITIZED_ARGS
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
++++ echo config:get thumbor NO_VHOST
+++ local SANITIZED_ARGS
+++ set -- config:get thumbor NO_VHOST
+++ DOKKU_CONFIG_TYPE=app
+++ DOKKU_CONFIG_RESTART=true
+++ [[ app == \a\p\p ]]
+++ [[ -z thumbor ]]
+++ verify_app_name thumbor
+++ declare 'desc=verify app name format and app existence'
+++ local APP=thumbor
+++ [[ ! -n thumbor ]]
+++ [[ ! thumbor =~ ^[a-z].* ]]
+++ [[ ! -d /home/dokku/thumbor ]]
+++ return 0
+++ APP=thumbor
+++ ENV_FILE=/home/dokku/thumbor/ENV
+++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
++++ get_sanitized_config_args config:get thumbor NO_VHOST
++++ local 'desc=return sanitized arguments for config plugin'
++++ SANITIZED_ARGS=("$@")
++++ local SANITIZED_ARGS
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
++++ echo config:get thumbor NO_VHOST
+++ local SANITIZED_ARGS
+++ set -- config:get thumbor NO_VHOST
+++ [[ -z thumbor ]]
+++ config_create /home/dokku/thumbor/ENV
+++ declare 'desc=create config env file'
+++ local ENV_FILE=/home/dokku/thumbor/ENV
+++ [[ -f /home/dokku/thumbor/ENV ]]
+++ [[ ! -s /home/dokku/thumbor/ENV ]]
+++ local KEY=NO_VHOST
+++ sed -e 's/^'\''//' -e 's/'\''$//'
+++ cut -d= -f2-
+++ grep '^export NO_VHOST='
+++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
++ local NO_VHOST=
++ local APP_VHOST_ENABLED=true
++ [[ '' == \1 ]]
++ echo true
+ local IS_APP_VHOST_ENABLED=true
+ [[ -z '' ]]
+ [[ -z '' ]]
+ [[ -z '' ]]
+ shopt -s nullglob
+ local DOKKU_APP_IP_FILE
+ for DOKKU_APP_IP_FILE in '$DOKKU_ROOT/$APP/IP.web.*'
+ local DOKKU_APP_PORT_FILE=/home/dokku/thumbor/PORT.web.1
+ local DOKKU_APP_LISTENER_IP=172.17.0.2
+ local DOKKU_APP_LISTENER_PORT=8080
+ [[ -z 8080 ]]
+ local 'DOKKU_APP_LISTENERS+= 172.17.0.2 '
++ xargs
++ echo ' 172.17.0.2 '
+ local DOKKU_APP_LISTENERS=172.17.0.2
+ shopt -u nullglob
++ mktemp -d /tmp/dokku_nginx_template.XXXXX
+ local NGINX_BUILD_CONFIG_TMP_WORK_DIR=/tmp/dokku_nginx_template.nHvqG
++ mktemp --tmpdir=/tmp/dokku_nginx_template.nHvqG nginx.conf.XXXXXX
+ local NGINX_CONF=/tmp/dokku_nginx_template.nHvqG/nginx.conf.eOG54u
+ local CUSTOM_NGINX_TEMPLATE=/tmp/dokku_nginx_template.nHvqG/nginx.conf.sigil
+ trap 'rm -rf $NGINX_CONF $NGINX_BUILD_CONFIG_TMP_WORK_DIR > /dev/null' RETURN INT TERM EXIT
+ get_custom_nginx_template thumbor /tmp/dokku_nginx_template.nHvqG/nginx.conf.sigil
+ declare 'desc=attempts to copy custom nginx template from app image'
+ local APP=thumbor
+ verify_app_name thumbor
+ declare 'desc=verify app name format and app existence'
+ local APP=thumbor
+ [[ ! -n thumbor ]]
+ [[ ! thumbor =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/thumbor ]]
+ return 0
+ local DESTINATION=/tmp/dokku_nginx_template.nHvqG/nginx.conf.sigil
++ get_running_image_tag thumbor
++ declare 'desc=retrieve current image tag for a given app. returns empty string if no deployed containers are found'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
++ CIDS=($(get_app_container_ids "$APP"))
+++ get_app_container_ids thumbor
+++ declare 'desc=returns list of docker container ids for given app'
+++ local APP=thumbor
+++ local CONTAINER_TYPE=
+++ verify_app_name thumbor
+++ declare 'desc=verify app name format and app existence'
+++ local APP=thumbor
+++ [[ ! -n thumbor ]]
+++ [[ ! thumbor =~ ^[a-z].* ]]
+++ [[ ! -d /home/dokku/thumbor ]]
+++ return 0
+++ [[ -f /home/dokku/thumbor/CONTAINER ]]
+++ [[ -n '' ]]
+++ local 'CONTAINER_PATTERN=/home/dokku/thumbor/CONTAINER.*'
+++ shopt -s nullglob
+++ local DOKKU_CID_FILE
+++ for DOKKU_CID_FILE in '$CONTAINER_PATTERN'
+++ local 'DOKKU_CIDS+= '
+++ local DOKKU_CIDS+=cac2eb1f0fb87502ed620f540408a8425f286388bc101122928bb7c0fd2f6501
+++ local 'DOKKU_CIDS+= '
+++ shopt -u nullglob
+++ echo ' cac2eb1f0fb87502ed620f540408a8425f286388bc101122928bb7c0fd2f6501 '
++ local CIDS
+++ awk -F: '{ print $2 }'
+++ docker inspect -f '{{ .Config.Image }}' cac2eb1f0fb87502ed620f540408a8425f286388bc101122928bb7c0fd2f6501
++ local RUNNING_IMAGE_TAG=latest
++ echo latest
+ local IMAGE_TAG=latest
++ get_app_image_name thumbor latest
++ declare 'desc=return image identifier for a given app, tag tuple. validate if tag is presented'
++ local APP=thumbor
++ local IMAGE_TAG=latest
+++ get_app_image_repo thumbor
+++ declare 'desc=central definition of image repo pattern'
+++ local APP=thumbor
+++ local IMAGE_REPO=dokku/thumbor
+++ [[ -z thumbor ]]
+++ echo dokku/thumbor
++ local IMAGE_REPO=dokku/thumbor
++ [[ -z thumbor ]]
++ [[ -n latest ]]
++ local IMAGE=dokku/thumbor:latest
++ verify_image dokku/thumbor:latest
++ declare 'desc=verify image existence'
++ local IMAGE=dokku/thumbor:latest
++ docker inspect dokku/thumbor:latest
++ return 0
++ echo dokku/thumbor:latest
+ local IMAGE=dokku/thumbor:latest
+ local NGINX_TEMPLATE_NAME=nginx.conf.sigil
+ copy_from_image dokku/thumbor:latest nginx.conf.sigil /tmp/dokku_nginx_template.nHvqG/nginx.conf.sigil
+ [[ -f /tmp/dokku_nginx_template.nHvqG/nginx.conf.sigil ]]
+ configure_nginx_ports thumbor
+ declare 'desc=configure nginx listening ports'
+ local APP=thumbor
+ verify_app_name thumbor
+ declare 'desc=verify app name format and app existence'
+ local APP=thumbor
+ [[ ! -n thumbor ]]
+ [[ ! thumbor =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/thumbor ]]
+ return 0
++ get_app_raw_tcp_ports thumbor
++ declare 'desc=extracts raw tcp port numbers from DOCKERFILE_PORTS config variable'
++ source /var/lib/dokku/plugins/available/config/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
++ local APP=thumbor
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
+++ config_get thumbor DOKKU_DOCKERFILE_PORTS
+++ declare 'desc=get value of given config var'
+++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
+++ set -- config:get thumbor DOKKU_DOCKERFILE_PORTS
+++ config_parse_args config:get thumbor DOKKU_DOCKERFILE_PORTS
+++ declare 'desc=parse config plugin args'
+++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+++ for var in '"$@"'
+++ [[ config:get == \-\-\g\l\o\b\a\l ]]
+++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ config:get == \-\-\e\x\p\o\r\t ]]
+++ [[ config:get == \-\-\s\h\e\l\l ]]
+++ for var in '"$@"'
+++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
+++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
+++ [[ thumbor == \-\-\s\h\e\l\l ]]
+++ for var in '"$@"'
+++ [[ DOKKU_DOCKERFILE_PORTS == \-\-\g\l\o\b\a\l ]]
+++ [[ DOKKU_DOCKERFILE_PORTS == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ DOKKU_DOCKERFILE_PORTS == \-\-\e\x\p\o\r\t ]]
+++ [[ DOKKU_DOCKERFILE_PORTS == \-\-\s\h\e\l\l ]]
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
++++ get_sanitized_config_args config:get thumbor DOKKU_DOCKERFILE_PORTS
++++ local 'desc=return sanitized arguments for config plugin'
++++ SANITIZED_ARGS=("$@")
++++ local SANITIZED_ARGS
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
++++ echo config:get thumbor DOKKU_DOCKERFILE_PORTS
+++ local SANITIZED_ARGS
+++ set -- config:get thumbor DOKKU_DOCKERFILE_PORTS
+++ DOKKU_CONFIG_TYPE=app
+++ DOKKU_CONFIG_RESTART=true
+++ [[ app == \a\p\p ]]
+++ [[ -z thumbor ]]
+++ verify_app_name thumbor
+++ declare 'desc=verify app name format and app existence'
+++ local APP=thumbor
+++ [[ ! -n thumbor ]]
+++ [[ ! thumbor =~ ^[a-z].* ]]
+++ [[ ! -d /home/dokku/thumbor ]]
+++ return 0
+++ APP=thumbor
+++ ENV_FILE=/home/dokku/thumbor/ENV
+++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
++++ get_sanitized_config_args config:get thumbor DOKKU_DOCKERFILE_PORTS
++++ local 'desc=return sanitized arguments for config plugin'
++++ SANITIZED_ARGS=("$@")
++++ local SANITIZED_ARGS
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
++++ echo config:get thumbor DOKKU_DOCKERFILE_PORTS
+++ local SANITIZED_ARGS
+++ set -- config:get thumbor DOKKU_DOCKERFILE_PORTS
+++ [[ -z thumbor ]]
+++ config_create /home/dokku/thumbor/ENV
+++ declare 'desc=create config env file'
+++ local ENV_FILE=/home/dokku/thumbor/ENV
+++ [[ -f /home/dokku/thumbor/ENV ]]
+++ [[ ! -s /home/dokku/thumbor/ENV ]]
+++ local KEY=DOKKU_DOCKERFILE_PORTS
+++ sed -e 's/^'\''//' -e 's/'\''$//'
+++ cut -d= -f2-
+++ grep '^export DOKKU_DOCKERFILE_PORTS='
+++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
++ local DOCKERFILE_PORTS=8080
++ for p in '$DOCKERFILE_PORTS'
++ [[ ! 8080 =~ .*udp.* ]]
++ p=8080
++ raw_tcp_ports+='8080 '
+++ xargs
+++ echo '8080 '
++ local raw_tcp_ports=8080
++ echo 8080
+ local RAW_TCP_PORTS=8080
++ config_get thumbor DOKKU_NGINX_PORT
++ declare 'desc=get value of given config var'
++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get thumbor DOKKU_NGINX_PORT
++ config_parse_args config:get thumbor DOKKU_NGINX_PORT
++ declare 'desc=parse config plugin args'
++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ for var in '"$@"'
++ [[ config:get == \-\-\g\l\o\b\a\l ]]
++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ config:get == \-\-\e\x\p\o\r\t ]]
++ [[ config:get == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
++ [[ thumbor == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ DOKKU_NGINX_PORT == \-\-\g\l\o\b\a\l ]]
++ [[ DOKKU_NGINX_PORT == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ DOKKU_NGINX_PORT == \-\-\e\x\p\o\r\t ]]
++ [[ DOKKU_NGINX_PORT == \-\-\s\h\e\l\l ]]
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_NGINX_PORT
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_NGINX_PORT
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_NGINX_PORT
++ DOKKU_CONFIG_TYPE=app
++ DOKKU_CONFIG_RESTART=true
++ [[ app == \a\p\p ]]
++ [[ -z thumbor ]]
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
++ APP=thumbor
++ ENV_FILE=/home/dokku/thumbor/ENV
++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_NGINX_PORT
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_NGINX_PORT
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_NGINX_PORT
++ [[ -z thumbor ]]
++ config_create /home/dokku/thumbor/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/thumbor/ENV
++ [[ -f /home/dokku/thumbor/ENV ]]
++ [[ ! -s /home/dokku/thumbor/ENV ]]
++ local KEY=DOKKU_NGINX_PORT
++ sed -e 's/^'\''//' -e 's/'\''$//'
++ cut -d= -f2-
++ grep '^export DOKKU_NGINX_PORT='
++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
+ local DOKKU_NGINX_PORT=80
++ config_get thumbor DOKKU_NGINX_SSL_PORT
++ declare 'desc=get value of given config var'
++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get thumbor DOKKU_NGINX_SSL_PORT
++ config_parse_args config:get thumbor DOKKU_NGINX_SSL_PORT
++ declare 'desc=parse config plugin args'
++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ for var in '"$@"'
++ [[ config:get == \-\-\g\l\o\b\a\l ]]
++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ config:get == \-\-\e\x\p\o\r\t ]]
++ [[ config:get == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
++ [[ thumbor == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ DOKKU_NGINX_SSL_PORT == \-\-\g\l\o\b\a\l ]]
++ [[ DOKKU_NGINX_SSL_PORT == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ DOKKU_NGINX_SSL_PORT == \-\-\e\x\p\o\r\t ]]
++ [[ DOKKU_NGINX_SSL_PORT == \-\-\s\h\e\l\l ]]
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_NGINX_SSL_PORT
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_NGINX_SSL_PORT
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_NGINX_SSL_PORT
++ DOKKU_CONFIG_TYPE=app
++ DOKKU_CONFIG_RESTART=true
++ [[ app == \a\p\p ]]
++ [[ -z thumbor ]]
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
++ APP=thumbor
++ ENV_FILE=/home/dokku/thumbor/ENV
++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_NGINX_SSL_PORT
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_NGINX_SSL_PORT
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_NGINX_SSL_PORT
++ [[ -z thumbor ]]
++ config_create /home/dokku/thumbor/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/thumbor/ENV
++ [[ -f /home/dokku/thumbor/ENV ]]
++ [[ ! -s /home/dokku/thumbor/ENV ]]
++ local KEY=DOKKU_NGINX_SSL_PORT
++ sed -e 's/^'\''//' -e 's/'\''$//'
++ cut -d= -f2-
++ grep '^export DOKKU_NGINX_SSL_PORT='
++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
+ local DOKKU_NGINX_SSL_PORT=
++ is_app_vhost_enabled thumbor
++ declare 'desc=returns true or false if vhost support is enabled for a given application'
++ source /var/lib/dokku/plugins/available/config/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
++ local APP=thumbor
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
+++ config_get thumbor NO_VHOST
+++ declare 'desc=get value of given config var'
+++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
+++ set -- config:get thumbor NO_VHOST
+++ config_parse_args config:get thumbor NO_VHOST
+++ declare 'desc=parse config plugin args'
+++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+++ for var in '"$@"'
+++ [[ config:get == \-\-\g\l\o\b\a\l ]]
+++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ config:get == \-\-\e\x\p\o\r\t ]]
+++ [[ config:get == \-\-\s\h\e\l\l ]]
+++ for var in '"$@"'
+++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
+++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
+++ [[ thumbor == \-\-\s\h\e\l\l ]]
+++ for var in '"$@"'
+++ [[ NO_VHOST == \-\-\g\l\o\b\a\l ]]
+++ [[ NO_VHOST == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ NO_VHOST == \-\-\e\x\p\o\r\t ]]
+++ [[ NO_VHOST == \-\-\s\h\e\l\l ]]
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
++++ get_sanitized_config_args config:get thumbor NO_VHOST
++++ local 'desc=return sanitized arguments for config plugin'
++++ SANITIZED_ARGS=("$@")
++++ local SANITIZED_ARGS
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
++++ echo config:get thumbor NO_VHOST
+++ local SANITIZED_ARGS
+++ set -- config:get thumbor NO_VHOST
+++ DOKKU_CONFIG_TYPE=app
+++ DOKKU_CONFIG_RESTART=true
+++ [[ app == \a\p\p ]]
+++ [[ -z thumbor ]]
+++ verify_app_name thumbor
+++ declare 'desc=verify app name format and app existence'
+++ local APP=thumbor
+++ [[ ! -n thumbor ]]
+++ [[ ! thumbor =~ ^[a-z].* ]]
+++ [[ ! -d /home/dokku/thumbor ]]
+++ return 0
+++ APP=thumbor
+++ ENV_FILE=/home/dokku/thumbor/ENV
+++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
++++ get_sanitized_config_args config:get thumbor NO_VHOST
++++ local 'desc=return sanitized arguments for config plugin'
++++ SANITIZED_ARGS=("$@")
++++ local SANITIZED_ARGS
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
++++ echo config:get thumbor NO_VHOST
+++ local SANITIZED_ARGS
+++ set -- config:get thumbor NO_VHOST
+++ [[ -z thumbor ]]
+++ config_create /home/dokku/thumbor/ENV
+++ declare 'desc=create config env file'
+++ local ENV_FILE=/home/dokku/thumbor/ENV
+++ [[ -f /home/dokku/thumbor/ENV ]]
+++ [[ ! -s /home/dokku/thumbor/ENV ]]
+++ local KEY=NO_VHOST
+++ sed -e 's/^'\''//' -e 's/'\''$//'
+++ cut -d= -f2-
+++ grep '^export NO_VHOST='
+++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
++ local NO_VHOST=
++ local APP_VHOST_ENABLED=true
++ [[ '' == \1 ]]
++ echo true
+ local IS_APP_VHOST_ENABLED=true
+ [[ -z 80 ]]
+ is_ssl_enabled thumbor
+ declare 'desc=returns 0 if ssl is enabled for given app'
+ local APP=thumbor
+ verify_app_name thumbor
+ declare 'desc=verify app name format and app existence'
+ local APP=thumbor
+ [[ ! -n thumbor ]]
+ [[ ! thumbor =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/thumbor ]]
+ return 0
+ local APP_SSL_PATH=/home/dokku/thumbor/tls
+ [[ -e /home/dokku/thumbor/tls/server.crt ]]
+ return 1
++ config_get thumbor DOKKU_NGINX_PORT
++ declare 'desc=get value of given config var'
++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get thumbor DOKKU_NGINX_PORT
++ config_parse_args config:get thumbor DOKKU_NGINX_PORT
++ declare 'desc=parse config plugin args'
++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ for var in '"$@"'
++ [[ config:get == \-\-\g\l\o\b\a\l ]]
++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ config:get == \-\-\e\x\p\o\r\t ]]
++ [[ config:get == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
++ [[ thumbor == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ DOKKU_NGINX_PORT == \-\-\g\l\o\b\a\l ]]
++ [[ DOKKU_NGINX_PORT == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ DOKKU_NGINX_PORT == \-\-\e\x\p\o\r\t ]]
++ [[ DOKKU_NGINX_PORT == \-\-\s\h\e\l\l ]]
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_NGINX_PORT
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_NGINX_PORT
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_NGINX_PORT
++ DOKKU_CONFIG_TYPE=app
++ DOKKU_CONFIG_RESTART=true
++ [[ app == \a\p\p ]]
++ [[ -z thumbor ]]
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
++ APP=thumbor
++ ENV_FILE=/home/dokku/thumbor/ENV
++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_NGINX_PORT
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_NGINX_PORT
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_NGINX_PORT
++ [[ -z thumbor ]]
++ config_create /home/dokku/thumbor/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/thumbor/ENV
++ [[ -f /home/dokku/thumbor/ENV ]]
++ [[ ! -s /home/dokku/thumbor/ENV ]]
++ local KEY=DOKKU_NGINX_PORT
++ sed -e 's/^'\''//' -e 's/'\''$//'
++ cut -d= -f2-
++ grep '^export DOKKU_NGINX_PORT='
++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
+ local NGINX_PORT=80
++ config_get thumbor DOKKU_NGINX_SSL_PORT
++ declare 'desc=get value of given config var'
++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get thumbor DOKKU_NGINX_SSL_PORT
++ config_parse_args config:get thumbor DOKKU_NGINX_SSL_PORT
++ declare 'desc=parse config plugin args'
++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ for var in '"$@"'
++ [[ config:get == \-\-\g\l\o\b\a\l ]]
++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ config:get == \-\-\e\x\p\o\r\t ]]
++ [[ config:get == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
++ [[ thumbor == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ DOKKU_NGINX_SSL_PORT == \-\-\g\l\o\b\a\l ]]
++ [[ DOKKU_NGINX_SSL_PORT == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ DOKKU_NGINX_SSL_PORT == \-\-\e\x\p\o\r\t ]]
++ [[ DOKKU_NGINX_SSL_PORT == \-\-\s\h\e\l\l ]]
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_NGINX_SSL_PORT
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_NGINX_SSL_PORT
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_NGINX_SSL_PORT
++ DOKKU_CONFIG_TYPE=app
++ DOKKU_CONFIG_RESTART=true
++ [[ app == \a\p\p ]]
++ [[ -z thumbor ]]
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
++ APP=thumbor
++ ENV_FILE=/home/dokku/thumbor/ENV
++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_NGINX_SSL_PORT
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_NGINX_SSL_PORT
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_NGINX_SSL_PORT
++ [[ -z thumbor ]]
++ config_create /home/dokku/thumbor/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/thumbor/ENV
++ [[ -f /home/dokku/thumbor/ENV ]]
++ [[ ! -s /home/dokku/thumbor/ENV ]]
++ local KEY=DOKKU_NGINX_SSL_PORT
++ sed -e 's/^'\''//' -e 's/'\''$//'
++ cut -d= -f2-
++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
++ grep '^export DOKKU_NGINX_SSL_PORT='
+ local NGINX_SSL_PORT=
++ get_app_domains thumbor
++ declare 'desc=return app domains'
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
++ local APP=thumbor
++ local APP_VHOST_FILE=/home/dokku/thumbor/VHOST
++ local GLOBAL_VHOST_PATH=/home/dokku/VHOST
++ local GLOBAL_HOSTNAME_PATH=/home/dokku/HOSTNAME
+++ is_app_vhost_enabled thumbor
+++ declare 'desc=returns true or false if vhost support is enabled for a given application'
+++ source /var/lib/dokku/plugins/available/config/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
++++ source /var/lib/dokku/core-plugins/available/common/functions
+++++ set -eo pipefail
+++++ [[ -n 1 ]]
+++++ set -x
+++ local APP=thumbor
+++ verify_app_name thumbor
+++ declare 'desc=verify app name format and app existence'
+++ local APP=thumbor
+++ [[ ! -n thumbor ]]
+++ [[ ! thumbor =~ ^[a-z].* ]]
+++ [[ ! -d /home/dokku/thumbor ]]
+++ return 0
++++ config_get thumbor NO_VHOST
++++ declare 'desc=get value of given config var'
++++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
++++ set -- config:get thumbor NO_VHOST
++++ config_parse_args config:get thumbor NO_VHOST
++++ declare 'desc=parse config plugin args'
++++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++++ for var in '"$@"'
++++ [[ config:get == \-\-\g\l\o\b\a\l ]]
++++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++++ [[ config:get == \-\-\e\x\p\o\r\t ]]
++++ [[ config:get == \-\-\s\h\e\l\l ]]
++++ for var in '"$@"'
++++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
++++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
++++ [[ thumbor == \-\-\s\h\e\l\l ]]
++++ for var in '"$@"'
++++ [[ NO_VHOST == \-\-\g\l\o\b\a\l ]]
++++ [[ NO_VHOST == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++++ [[ NO_VHOST == \-\-\e\x\p\o\r\t ]]
++++ [[ NO_VHOST == \-\-\s\h\e\l\l ]]
++++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++++ get_sanitized_config_args config:get thumbor NO_VHOST
+++++ local 'desc=return sanitized arguments for config plugin'
+++++ SANITIZED_ARGS=("$@")
+++++ local SANITIZED_ARGS
+++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++++ echo config:get thumbor NO_VHOST
++++ local SANITIZED_ARGS
++++ set -- config:get thumbor NO_VHOST
++++ DOKKU_CONFIG_TYPE=app
++++ DOKKU_CONFIG_RESTART=true
++++ [[ app == \a\p\p ]]
++++ [[ -z thumbor ]]
++++ verify_app_name thumbor
++++ declare 'desc=verify app name format and app existence'
++++ local APP=thumbor
++++ [[ ! -n thumbor ]]
++++ [[ ! thumbor =~ ^[a-z].* ]]
++++ [[ ! -d /home/dokku/thumbor ]]
++++ return 0
++++ APP=thumbor
++++ ENV_FILE=/home/dokku/thumbor/ENV
++++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++++ get_sanitized_config_args config:get thumbor NO_VHOST
+++++ local 'desc=return sanitized arguments for config plugin'
+++++ SANITIZED_ARGS=("$@")
+++++ local SANITIZED_ARGS
+++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++++ echo config:get thumbor NO_VHOST
++++ local SANITIZED_ARGS
++++ set -- config:get thumbor NO_VHOST
++++ [[ -z thumbor ]]
++++ config_create /home/dokku/thumbor/ENV
++++ declare 'desc=create config env file'
++++ local ENV_FILE=/home/dokku/thumbor/ENV
++++ [[ -f /home/dokku/thumbor/ENV ]]
++++ [[ ! -s /home/dokku/thumbor/ENV ]]
++++ local KEY=NO_VHOST
++++ sed -e 's/^'\''//' -e 's/'\''$//'
++++ cut -d= -f2-
++++ grep '^export NO_VHOST='
++++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
+++ local NO_VHOST=
+++ local APP_VHOST_ENABLED=true
+++ [[ '' == \1 ]]
+++ echo true
++ [[ true == \t\r\u\e ]]
++ [[ -f /home/dokku/thumbor/VHOST ]]
++ cat /home/dokku/thumbor/VHOST
+ local NONSSL_VHOSTS=thumb.sphax.it
++ xargs
++ echo thumb.sphax.it
+ local NOSSL_SERVER_NAME=thumb.sphax.it
+ is_ssl_enabled thumbor
+ declare 'desc=returns 0 if ssl is enabled for given app'
+ local APP=thumbor
+ verify_app_name thumbor
+ declare 'desc=verify app name format and app existence'
+ local APP=thumbor
+ [[ ! -n thumbor ]]
+ [[ ! thumbor =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/thumbor ]]
+ return 0
+ local APP_SSL_PATH=/home/dokku/thumbor/tls
+ [[ -e /home/dokku/thumbor/tls/server.crt ]]
+ return 1
++ config_export app thumbor
++ declare 'desc=returns export command for config variable of specified type (app/global)'
++ local CONFIG_TYPE=app
++ local APP=thumbor
++ local ENV_FILE=/home/dokku/thumbor/ENV
++ [[ app == \g\l\o\b\a\l ]]
++ [[ ! -f /home/dokku/thumbor/ENV ]]
++ [[ ! -s /home/dokku/thumbor/ENV ]]
+++ cut '-d ' -f2-
+++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
++ local 'VARS=DOKKU_APP_RESTORE='\''1'\''
DOKKU_APP_TYPE='\''dockerfile'\''
DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\''
DOKKU_DOCKERFILE_PORTS='\''8080'\''
DOKKU_NGINX_PORT='\''80'\''
THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\'''
++ awk '{print "export " $0}'
++ echo 'DOKKU_APP_RESTORE='\''1'\''
DOKKU_APP_TYPE='\''dockerfile'\''
DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\''
DOKKU_DOCKERFILE_PORTS='\''8080'\''
DOKKU_NGINX_PORT='\''80'\''
THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\'''
++ return 0
+ eval 'export DOKKU_APP_RESTORE='\''1'\''
export DOKKU_APP_TYPE='\''dockerfile'\''
export DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\''
export DOKKU_DOCKERFILE_PORTS='\''8080'\''
export DOKKU_NGINX_PORT='\''80'\''
export THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\'''
++ export DOKKU_APP_RESTORE=1
++ DOKKU_APP_RESTORE=1
++ export DOKKU_APP_TYPE=dockerfile
++ DOKKU_APP_TYPE=dockerfile
++ export 'DOKKU_DOCKERFILE_CMD=CMD thumbor -p $PORT -c thumbor.conf'
++ DOKKU_DOCKERFILE_CMD='CMD thumbor -p $PORT -c thumbor.conf'
++ export DOKKU_DOCKERFILE_PORTS=8080
++ DOKKU_DOCKERFILE_PORTS=8080
++ export DOKKU_NGINX_PORT=80
++ DOKKU_NGINX_PORT=80
++ export 'THUMBOR_SECURITY_KEY=lkjf78ddqqsd!'
++ THUMBOR_SECURITY_KEY='lkjf78ddqqsd!'
+ SIGIL_PARAMS=(-f $NGINX_TEMPLATE APP="$APP" DOKKU_ROOT="$DOKKU_ROOT" NOSSL_SERVER_NAME="$NOSSL_SERVER_NAME" DOKKU_APP_LISTENERS="$DOKKU_APP_LISTENERS" PASSED_LISTEN_IP_PORT="$PASSED_LISTEN_IP_PORT" DOKKU_APP_LISTEN_PORT="$DOKKU_APP_LISTEN_PORT" DOKKU_APP_LISTEN_IP="$DOKKU_APP_LISTEN_IP" APP_SSL_PATH="$APP_SSL_PATH" SSL_INUSE="$SSL_INUSE" SSL_SERVER_NAME="$SSL_SERVER_NAME" NGINX_PORT="$NGINX_PORT" NGINX_SSL_PORT="$NGINX_SSL_PORT" RAW_TCP_PORTS="$RAW_TCP_PORTS")
+ local SIGIL_PARAMS
+ xargs -i echo '-----> Configuring {}...(using built-in template)'
++ sort -u
++ tr ' ' '\n'
++ echo '' thumb.sphax.it
-----> Configuring thumb.sphax.it...(using built-in template)
+ sigil -f /var/lib/dokku/plugins/available/nginx-vhosts/templates/nginx.conf.sigil APP=thumbor DOKKU_ROOT=/home/dokku NOSSL_SERVER_NAME=thumb.sphax.it DOKKU_APP_LISTENERS=172.17.0.2 PASSED_LISTEN_IP_PORT= DOKKU_APP_LISTEN_PORT= DOKKU_APP_LISTEN_IP= APP_SSL_PATH=/home/dokku/thumbor/tls SSL_INUSE= SSL_SERVER_NAME= NGINX_PORT=80 NGINX_SSL_PORT= RAW_TCP_PORTS=8080
+ is_deployed thumbor
+ declare 'desc=return 0 if given app has a running container'
+ local APP=thumbor
+ [[ -f /home/dokku/thumbor/CONTAINER ]]
++ ls /home/dokku/thumbor/CONTAINER.web.1
++ echo 0
+ [[ 0 -eq 0 ]]
+ return 0
+ dokku_log_info1 'Creating http nginx.conf'
+ declare 'desc=log info1 formatter'
+ echo '-----> Creating http nginx.conf'
+ mv /tmp/dokku_nginx_template.nHvqG/nginx.conf.eOG54u /home/dokku/thumbor/nginx.conf
-----> Creating http nginx.conf
+ is_deployed thumbor
+ declare 'desc=return 0 if given app has a running container'
+ local APP=thumbor
+ [[ -f /home/dokku/thumbor/CONTAINER ]]
++ ls /home/dokku/thumbor/CONTAINER.web.1
++ echo 0
+ [[ 0 -eq 0 ]]
+ return 0
+ dokku_log_info1 'Running nginx-pre-reload'
+ declare 'desc=log info1 formatter'
+ echo '-----> Running nginx-pre-reload'
+ plugn trigger nginx-pre-reload thumbor '' ''
-----> Running nginx-pre-reload
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
+ dokku_log_verbose 'Reloading nginx'
+ declare 'desc=log verbose formatter'
+ echo ' Reloading nginx'
+ validate_nginx
Reloading nginx
+ declare 'desc=validate entire nginx config'
+ set +e
+ sudo /usr/sbin/nginx -t
+ local exit_code=0
+ set -e
+ [[ 0 -ne 0 ]]
+ restart_nginx
+ declare 'desc=restart nginx for given distros'
+ case "$DOKKU_DISTRO" in
+ sudo /etc/init.d/nginx reload
+ [[ -n thumb.sphax.it ]]
+ [[ true == \t\r\u\e ]]
+ echo '# THIS FILE IS GENERATED BY DOKKU - DO NOT EDIT, YOUR CHANGES WILL BE OVERWRITTEN'
+ xargs -i echo 'http://{}'
++ sort -u
++ tr ' ' '\n'
++ echo '' thumb.sphax.it
++ rm -rf /tmp/dokku_nginx_template.nHvqG/nginx.conf.eOG54u /tmp/dokku_nginx_template.nHvqG
++ rm -rf
+ rm -rf
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ source /var/lib/dokku/plugins/available/config/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+ source /var/lib/dokku/plugins/available/ps/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
++ source /var/lib/dokku/plugins/available/config/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
+ ps_post_deploy thumbor 8080 172.17.0.2 ''
+ declare 'desc=ps post-deploy plugin trigger'
+ local trigger=ps_post_deploy
+ local APP=thumbor
+ remove_procfile thumbor
+ declare 'desc=removes DOKKU_PROCFILE'
+ local APP=thumbor
+ local DOKKU_PROCFILE=/home/dokku/thumbor/DOKKU_PROCFILE
+ [[ -f /home/dokku/thumbor/DOKKU_PROCFILE ]]
+ config_set --no-restart thumbor DOKKU_APP_RESTORE=1
+ declare 'desc=set value of given config var'
+ [[ --no-restart == \c\o\n\f\i\g\:\s\e\t ]]
+ set -- config:set --no-restart thumbor DOKKU_APP_RESTORE=1
+ config_parse_args config:set --no-restart thumbor DOKKU_APP_RESTORE=1
+ declare 'desc=parse config plugin args'
+ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+ for var in '"$@"'
+ [[ config:set == \-\-\g\l\o\b\a\l ]]
+ [[ config:set == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+ [[ config:set == \-\-\e\x\p\o\r\t ]]
+ [[ config:set == \-\-\s\h\e\l\l ]]
+ for var in '"$@"'
+ [[ --no-restart == \-\-\g\l\o\b\a\l ]]
+ [[ --no-restart == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+ DOKKU_CONFIG_RESTART=false
+ [[ --no-restart == \-\-\e\x\p\o\r\t ]]
+ [[ --no-restart == \-\-\s\h\e\l\l ]]
+ for var in '"$@"'
+ [[ thumbor == \-\-\g\l\o\b\a\l ]]
+ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+ [[ thumbor == \-\-\e\x\p\o\r\t ]]
+ [[ thumbor == \-\-\s\h\e\l\l ]]
+ for var in '"$@"'
+ [[ DOKKU_APP_RESTORE=1 == \-\-\g\l\o\b\a\l ]]
+ [[ DOKKU_APP_RESTORE=1 == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+ [[ DOKKU_APP_RESTORE=1 == \-\-\e\x\p\o\r\t ]]
+ [[ DOKKU_APP_RESTORE=1 == \-\-\s\h\e\l\l ]]
+ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
++ get_sanitized_config_args config:set --no-restart thumbor DOKKU_APP_RESTORE=1
++ local 'desc=return sanitized arguments for config plugin'
++ SANITIZED_ARGS=("$@")
++ local SANITIZED_ARGS
++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
++ echo config:set '' thumbor DOKKU_APP_RESTORE=1
+ local SANITIZED_ARGS
+ set -- config:set thumbor DOKKU_APP_RESTORE=1
+ DOKKU_CONFIG_TYPE=app
+ DOKKU_CONFIG_RESTART=false
+ [[ app == \a\p\p ]]
+ [[ -z thumbor ]]
+ verify_app_name thumbor
+ declare 'desc=verify app name format and app existence'
+ local APP=thumbor
+ [[ ! -n thumbor ]]
+ [[ ! thumbor =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/thumbor ]]
+ return 0
+ APP=thumbor
+ ENV_FILE=/home/dokku/thumbor/ENV
+ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+ [[ -z thumbor DOKKU_APP_RESTORE=1 ]]
+ config_create /home/dokku/thumbor/ENV
+ declare 'desc=create config env file'
+ local ENV_FILE=/home/dokku/thumbor/ENV
+ [[ -f /home/dokku/thumbor/ENV ]]
+ local ENV_ADD=
++ cat /home/dokku/thumbor/ENV
+ local 'ENV_TEMP=export DOKKU_APP_RESTORE='\''1'\''
export DOKKU_APP_TYPE='\''dockerfile'\''
export DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\''
export DOKKU_DOCKERFILE_PORTS='\''8080'\''
export DOKKU_NGINX_PORT='\''80'\''
export THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\'''
+ local RESTART_APP=false
+ shift 2
+ for var in '"$@"'
+ [[ thumbor == \-\-\g\l\o\b\a\l ]]
+ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+ [[ -n thumbor ]]
+ [[ thumbor == \t\h\u\m\b\o\r ]]
+ shift 1
+ for var in '"$@"'
+ [[ DOKKU_APP_RESTORE=1 == \-\-\g\l\o\b\a\l ]]
+ [[ DOKKU_APP_RESTORE=1 == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+ [[ -n thumbor ]]
+ [[ DOKKU_APP_RESTORE=1 == \t\h\u\m\b\o\r ]]
+ [[ DOKKU_APP_RESTORE=1 != *\=* ]]
+ for var in '"$@"'
++ cut -d= -f1
++ echo DOKKU_APP_RESTORE=1
+ local KEY=DOKKU_APP_RESTORE
++ cut -d= -f2-
++ echo DOKKU_APP_RESTORE=1
+ local VALUE=1
+ [[ DOKKU_APP_RESTORE =~ [a-zA-Z_][a-zA-Z0-9_]* ]]
+ local RESTART_APP=true
++ sed '/^export DOKKU_APP_RESTORE=/ d'
++ echo 'export DOKKU_APP_RESTORE='\''1'\''
export DOKKU_APP_TYPE='\''dockerfile'\''
export DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\''
export DOKKU_DOCKERFILE_PORTS='\''8080'\''
export DOKKU_NGINX_PORT='\''80'\''
export THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\'''
+ local 'ENV_TEMP=export DOKKU_APP_TYPE='\''dockerfile'\''
export DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\''
export DOKKU_DOCKERFILE_PORTS='\''8080'\''
export DOKKU_NGINX_PORT='\''80'\''
export THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\'''
+ local 'ENV_TEMP=export DOKKU_APP_TYPE='\''dockerfile'\''
export DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\''
export DOKKU_DOCKERFILE_PORTS='\''8080'\''
export DOKKU_NGINX_PORT='\''80'\''
export THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\''
export DOKKU_APP_RESTORE='\''1'\'''
++ sed '/^DOKKU_APP_RESTORE=/ d'
++ echo -e ''
+ local ENV_ADD=
+ local 'ENV_ADD=$
DOKKU_APP_RESTORE=1'
++ tail -n +2
++ echo '$
DOKKU_APP_RESTORE=1'
+ local ENV_ADD=DOKKU_APP_RESTORE=1
+ [[ -n true ]]
+ dokku_log_info1 'Setting config vars'
+ declare 'desc=log info1 formatter'
+ echo '-----> Setting config vars'
+ config_styled_hash DOKKU_APP_RESTORE=1 ' '
-----> Setting config vars
+ declare 'desc=internal config hash'
+ local vars=DOKKU_APP_RESTORE=1
+ local 'prefix= '
+ local longest=
+ read -r word
++ cut -d= -f1
++ echo DOKKU_APP_RESTORE=1
+ local KEY=DOKKU_APP_RESTORE
+ [[ 17 -gt 0 ]]
+ local longest=DOKKU_APP_RESTORE
+ read -r word
+ read -r word
++ cut -d= -f1
++ echo DOKKU_APP_RESTORE=1
+ local KEY=DOKKU_APP_RESTORE
++ sed -e 's/^'\''//' -e 's/'\''$//' -e 's/$$//g'
++ cut -d= -f2-
++ echo DOKKU_APP_RESTORE=1
+ local VALUE=1
+ local num_zeros=0
+ local 'zeros= '
+ [[ 0 -gt 0 ]]
+ echo ' DOKKU_APP_RESTORE: 1'
+ read -r word
DOKKU_APP_RESTORE: 1
+ config_write 'export DOKKU_APP_TYPE='\''dockerfile'\''
export DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\''
export DOKKU_DOCKERFILE_PORTS='\''8080'\''
export DOKKU_NGINX_PORT='\''80'\''
export THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\''
export DOKKU_APP_RESTORE='\''1'\'''
+ declare 'desc=writes config vars out to appropriate file path'
+ local 'ENV_TEMP=export DOKKU_APP_TYPE='\''dockerfile'\''
export DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\''
export DOKKU_DOCKERFILE_PORTS='\''8080'\''
export DOKKU_NGINX_PORT='\''80'\''
export THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\''
export DOKKU_APP_RESTORE='\''1'\'''
+ local ENV_FILE_TEMP=/home/dokku/thumbor/ENV.tmp
+ sort
+ sed '/^$/d'
+ echo 'export DOKKU_APP_TYPE='\''dockerfile'\''
export DOKKU_DOCKERFILE_CMD='\''CMD thumbor -p $PORT -c thumbor.conf'\''
export DOKKU_DOCKERFILE_PORTS='\''8080'\''
export DOKKU_NGINX_PORT='\''80'\''
export THUMBOR_SECURITY_KEY='\''lkjf78ddqqsd!'\''
export DOKKU_APP_RESTORE='\''1'\'''
+ cmp -s /home/dokku/thumbor/ENV /home/dokku/thumbor/ENV.tmp
+ rm -f /home/dokku/thumbor/ENV.tmp
+ plugn trigger post-config-update thumbor set DOKKU_APP_RESTORE=1
+ [[ -n thumbor ]]
++ config_get thumbor DOKKU_APP_RESTORE
++ declare 'desc=get value of given config var'
++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get thumbor DOKKU_APP_RESTORE
++ config_parse_args config:get thumbor DOKKU_APP_RESTORE
++ declare 'desc=parse config plugin args'
++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ for var in '"$@"'
++ [[ config:get == \-\-\g\l\o\b\a\l ]]
++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ config:get == \-\-\e\x\p\o\r\t ]]
++ [[ config:get == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
++ [[ thumbor == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ DOKKU_APP_RESTORE == \-\-\g\l\o\b\a\l ]]
++ [[ DOKKU_APP_RESTORE == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ DOKKU_APP_RESTORE == \-\-\e\x\p\o\r\t ]]
++ [[ DOKKU_APP_RESTORE == \-\-\s\h\e\l\l ]]
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_APP_RESTORE
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_APP_RESTORE
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_APP_RESTORE
++ DOKKU_CONFIG_TYPE=app
++ DOKKU_CONFIG_RESTART=true
++ [[ app == \a\p\p ]]
++ [[ -z thumbor ]]
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
++ APP=thumbor
++ ENV_FILE=/home/dokku/thumbor/ENV
++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_APP_RESTORE
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_APP_RESTORE
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_APP_RESTORE
++ [[ -z thumbor ]]
++ config_create /home/dokku/thumbor/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/thumbor/ENV
++ [[ -f /home/dokku/thumbor/ENV ]]
++ [[ ! -s /home/dokku/thumbor/ENV ]]
++ local KEY=DOKKU_APP_RESTORE
++ sed -e 's/^'\''//' -e 's/'\''$//'
++ cut -d= -f2-
++ grep '^export DOKKU_APP_RESTORE='
++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
+ local DOKKU_APP_RESTORE=1
+ [[ false == \t\r\u\e ]]
+ [[ -n 083b306d6655691624c7fe9d592688350876eba2a5c4922673530c966c96c065 ]]
+ [[ -z '' ]]
++ config_get thumbor DOKKU_WAIT_TO_RETIRE
++ declare 'desc=get value of given config var'
++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get thumbor DOKKU_WAIT_TO_RETIRE
++ config_parse_args config:get thumbor DOKKU_WAIT_TO_RETIRE
++ declare 'desc=parse config plugin args'
++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ for var in '"$@"'
++ [[ config:get == \-\-\g\l\o\b\a\l ]]
++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ config:get == \-\-\e\x\p\o\r\t ]]
++ [[ config:get == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
++ [[ thumbor == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ DOKKU_WAIT_TO_RETIRE == \-\-\g\l\o\b\a\l ]]
++ [[ DOKKU_WAIT_TO_RETIRE == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ DOKKU_WAIT_TO_RETIRE == \-\-\e\x\p\o\r\t ]]
++ [[ DOKKU_WAIT_TO_RETIRE == \-\-\s\h\e\l\l ]]
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_WAIT_TO_RETIRE
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_WAIT_TO_RETIRE
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_WAIT_TO_RETIRE
++ DOKKU_CONFIG_TYPE=app
++ DOKKU_CONFIG_RESTART=true
++ [[ app == \a\p\p ]]
++ [[ -z thumbor ]]
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
++ APP=thumbor
++ ENV_FILE=/home/dokku/thumbor/ENV
++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_WAIT_TO_RETIRE
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_WAIT_TO_RETIRE
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_WAIT_TO_RETIRE
++ [[ -z thumbor ]]
++ config_create /home/dokku/thumbor/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/thumbor/ENV
++ [[ -f /home/dokku/thumbor/ENV ]]
++ [[ ! -s /home/dokku/thumbor/ENV ]]
++ local KEY=DOKKU_WAIT_TO_RETIRE
++ sed -e 's/^'\''//' -e 's/'\''$//'
++ cut -d= -f2-
++ grep '^export DOKKU_WAIT_TO_RETIRE='
++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
++ true
+ local DOKKU_APP_DOKKU_WAIT_TO_RETIRE=
++ config_get --global DOKKU_WAIT_TO_RETIRE
++ declare 'desc=get value of given config var'
++ [[ --global == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get --global DOKKU_WAIT_TO_RETIRE
++ config_parse_args config:get --global DOKKU_WAIT_TO_RETIRE
++ declare 'desc=parse config plugin args'
++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ for var in '"$@"'
++ [[ config:get == \-\-\g\l\o\b\a\l ]]
++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ config:get == \-\-\e\x\p\o\r\t ]]
++ [[ config:get == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ --global == \-\-\g\l\o\b\a\l ]]
++ ENV_FILE=/home/dokku/ENV
++ DOKKU_CONFIG_TYPE=global
++ DOKKU_CONFIG_RESTART=false
++ [[ --global == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ --global == \-\-\e\x\p\o\r\t ]]
++ [[ --global == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ DOKKU_WAIT_TO_RETIRE == \-\-\g\l\o\b\a\l ]]
++ [[ DOKKU_WAIT_TO_RETIRE == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ DOKKU_WAIT_TO_RETIRE == \-\-\e\x\p\o\r\t ]]
++ [[ DOKKU_WAIT_TO_RETIRE == \-\-\s\h\e\l\l ]]
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get --global DOKKU_WAIT_TO_RETIRE
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get '' DOKKU_WAIT_TO_RETIRE
++ local SANITIZED_ARGS
++ set -- config:get DOKKU_WAIT_TO_RETIRE
++ DOKKU_CONFIG_TYPE=global
++ DOKKU_CONFIG_RESTART=false
++ [[ global == \a\p\p ]]
++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get --global DOKKU_WAIT_TO_RETIRE
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get '' DOKKU_WAIT_TO_RETIRE
++ local SANITIZED_ARGS
++ set -- config:get DOKKU_WAIT_TO_RETIRE
++ [[ -z DOKKU_WAIT_TO_RETIRE ]]
++ config_create /home/dokku/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/ENV
++ [[ -f /home/dokku/ENV ]]
++ [[ ! -s /home/dokku/ENV ]]
++ return 0
+ local DOKKU_GLOBAL_DOKKU_WAIT_TO_RETIRE=
+ local DOKKU_WAIT_TO_RETIRE=
+ local WAIT=60
+ dokku_log_info1 'Shutting down old containers in 60 seconds'
+ declare 'desc=log info1 formatter'
+ echo '-----> Shutting down old containers in 60 seconds'
+ local oldid
-----> Shutting down old containers in 60 seconds
+ for oldid in '$oldids'
+ dokku_log_info2 083b306d6655691624c7fe9d592688350876eba2a5c4922673530c966c96c065
+ declare 'desc=log info2 formatter'
+ echo '=====> 083b306d6655691624c7fe9d592688350876eba2a5c4922673530c966c96c065'
=====> 083b306d6655691624c7fe9d592688350876eba2a5c4922673530c966c96c065
++ config_get thumbor DOKKU_DOCKER_STOP_TIMEOUT
++ declare 'desc=get value of given config var'
++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get thumbor DOKKU_DOCKER_STOP_TIMEOUT
++ config_parse_args config:get thumbor DOKKU_DOCKER_STOP_TIMEOUT
++ declare 'desc=parse config plugin args'
++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ for var in '"$@"'
++ [[ config:get == \-\-\g\l\o\b\a\l ]]
++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ config:get == \-\-\e\x\p\o\r\t ]]
++ [[ config:get == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
++ [[ thumbor == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ DOKKU_DOCKER_STOP_TIMEOUT == \-\-\g\l\o\b\a\l ]]
++ [[ DOKKU_DOCKER_STOP_TIMEOUT == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ DOKKU_DOCKER_STOP_TIMEOUT == \-\-\e\x\p\o\r\t ]]
++ [[ DOKKU_DOCKER_STOP_TIMEOUT == \-\-\s\h\e\l\l ]]
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_DOCKER_STOP_TIMEOUT
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_DOCKER_STOP_TIMEOUT
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_DOCKER_STOP_TIMEOUT
++ DOKKU_CONFIG_TYPE=app
++ DOKKU_CONFIG_RESTART=true
++ [[ app == \a\p\p ]]
++ [[ -z thumbor ]]
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
++ APP=thumbor
++ ENV_FILE=/home/dokku/thumbor/ENV
++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get thumbor DOKKU_DOCKER_STOP_TIMEOUT
+++ local 'desc=return sanitized arguments for config plugin'
+++ SANITIZED_ARGS=("$@")
+++ local SANITIZED_ARGS
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
+++ echo config:get thumbor DOKKU_DOCKER_STOP_TIMEOUT
++ local SANITIZED_ARGS
++ set -- config:get thumbor DOKKU_DOCKER_STOP_TIMEOUT
++ [[ -z thumbor ]]
++ config_create /home/dokku/thumbor/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/thumbor/ENV
++ [[ -f /home/dokku/thumbor/ENV ]]
++ [[ ! -s /home/dokku/thumbor/ENV ]]
++ local KEY=DOKKU_DOCKER_STOP_TIMEOUT
++ sed -e 's/^'\''//' -e 's/'\''$//'
++ cut -d= -f2-
++ grep '^export DOKKU_DOCKER_STOP_TIMEOUT='
++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
++ true
+ local DOKKU_DOCKER_STOP_TIMEOUT=
+ [[ -n '' ]]
+ disown -a
+ sleep 0.1
+ exec
+ implemented=1
+ [[ 1 -eq 0 ]]
+ [[ 1 -eq 0 ]]
+ dokku_log_info2 'Application deployed:'
+ declare 'desc=log info2 formatter'
+ echo '=====> Application deployed:'
=====> Application deployed:
+ sed 's/^/ /'
+ get_app_urls urls thumbor
+ declare 'desc=print an app'\''s available urls'
+ source /var/lib/dokku/plugins/available/config/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+ source /var/lib/dokku/plugins/available/proxy/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
++ source /var/lib/dokku/plugins/available/config/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
+ local APP=thumbor
+ verify_app_name thumbor
+ declare 'desc=verify app name format and app existence'
+ local APP=thumbor
+ [[ ! -n thumbor ]]
+ [[ ! thumbor =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/thumbor ]]
+ return 0
++ get_app_raw_tcp_ports thumbor
++ declare 'desc=extracts raw tcp port numbers from DOCKERFILE_PORTS config variable'
++ source /var/lib/dokku/plugins/available/config/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
++ local APP=thumbor
++ verify_app_name thumbor
++ declare 'desc=verify app name format and app existence'
++ local APP=thumbor
++ [[ ! -n thumbor ]]
++ [[ ! thumbor =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/thumbor ]]
++ return 0
+++ config_get thumbor DOKKU_DOCKERFILE_PORTS
+++ declare 'desc=get value of given config var'
+++ [[ thumbor == \c\o\n\f\i\g\:\g\e\t ]]
+++ set -- config:get thumbor DOKKU_DOCKERFILE_PORTS
+++ config_parse_args config:get thumbor DOKKU_DOCKERFILE_PORTS
+++ declare 'desc=parse config plugin args'
+++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+++ for var in '"$@"'
+++ [[ config:get == \-\-\g\l\o\b\a\l ]]
+++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ config:get == \-\-\e\x\p\o\r\t ]]
+++ [[ config:get == \-\-\s\h\e\l\l ]]
+++ for var in '"$@"'
+++ [[ thumbor == \-\-\g\l\o\b\a\l ]]
+++ [[ thumbor == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ thumbor == \-\-\e\x\p\o\r\t ]]
+++ [[ thumbor == \-\-\s\h\e\l\l ]]
+++ for var in '"$@"'
+++ [[ DOKKU_DOCKERFILE_PORTS == \-\-\g\l\o\b\a\l ]]
+++ [[ DOKKU_DOCKERFILE_PORTS == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ DOKKU_DOCKERFILE_PORTS == \-\-\e\x\p\o\r\t ]]
+++ [[ DOKKU_DOCKERFILE_PORTS == \-\-\s\h\e\l\l ]]
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
++++ get_sanitized_config_args config:get thumbor DOKKU_DOCKERFILE_PORTS
++++ local 'desc=return sanitized arguments for config plugin'
++++ SANITIZED_ARGS=("$@")
++++ local SANITIZED_ARGS
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
++++ echo config:get thumbor DOKKU_DOCKERFILE_PORTS
+++ local SANITIZED_ARGS
+++ set -- config:get thumbor DOKKU_DOCKERFILE_PORTS
+++ DOKKU_CONFIG_TYPE=app
+++ DOKKU_CONFIG_RESTART=true
+++ [[ app == \a\p\p ]]
+++ [[ -z thumbor ]]
+++ verify_app_name thumbor
+++ declare 'desc=verify app name format and app existence'
+++ local APP=thumbor
+++ [[ ! -n thumbor ]]
+++ [[ ! thumbor =~ ^[a-z].* ]]
+++ [[ ! -d /home/dokku/thumbor ]]
+++ return 0
+++ APP=thumbor
+++ ENV_FILE=/home/dokku/thumbor/ENV
+++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
++++ get_sanitized_config_args config:get thumbor DOKKU_DOCKERFILE_PORTS
++++ local 'desc=return sanitized arguments for config plugin'
++++ SANITIZED_ARGS=("$@")
++++ local SANITIZED_ARGS
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
++++ echo config:get thumbor DOKKU_DOCKERFILE_PORTS
+++ local SANITIZED_ARGS
+++ set -- config:get thumbor DOKKU_DOCKERFILE_PORTS
+++ [[ -z thumbor ]]
+++ config_create /home/dokku/thumbor/ENV
+++ declare 'desc=create config env file'
+++ local ENV_FILE=/home/dokku/thumbor/ENV
+++ [[ -f /home/dokku/thumbor/ENV ]]
+++ [[ ! -s /home/dokku/thumbor/ENV ]]
+++ local KEY=DOKKU_DOCKERFILE_PORTS
+++ sed -e 's/^'\''//' -e 's/'\''$//'
+++ cut -d= -f2-
+++ grep '^export DOKKU_DOCKERFILE_PORTS='
+++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/thumbor/ENV
++ local DOCKERFILE_PORTS=8080
++ for p in '$DOCKERFILE_PORTS'
++ [[ ! 8080 =~ .*udp.* ]]
++ p=8080
++ raw_tcp_ports+='8080 '
+++ xargs
+++ echo '8080 '
++ local raw_tcp_ports=8080
++ echo 8080
+ local RAW_TCP_PORTS=8080
+ local URLS_FILE=/home/dokku/thumbor/URLS
+ [[ -s /home/dokku/thumbor/URLS ]]
++ egrep -v '^#' /home/dokku/thumbor/URLS
+ local app_urls=http://thumb.sphax.it
+ [[ -n 8080 ]]
+ for url in '${app_urls[*]}'
+ for p in '$RAW_TCP_PORTS'
+ local 'port_urls+=http://thumb.sphax.it:8080 '
++ xargs
++ echo 'http://thumb.sphax.it:8080 '
+ local port_urls=http://thumb.sphax.it:8080
+ local URLS=http://thumb.sphax.it:8080
+ case "$1" in
+ tr ' ' '\n'
+ echo http://thumb.sphax.it:8080
http://thumb.sphax.it:8080
+ echo
+ implemented=1
+ [[ 1 -eq 0 ]]
+ [[ 1 -eq 0 ]]
++ rm -rf /tmp/dokku_git.ipYD
++ rm -rf ''
+ rm -rf ''
+ exit_code=0
+ set -e
+ [[ 0 -eq 10 ]]
+ implemented=1
+ [[ 0 -ne 0 ]]
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/letsencrypt/commands git-build-locked thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/logs/commands git-build-locked thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/nginx-vhosts/commands git-build-locked thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/plugin/commands git-build-locked thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/proxy/commands git-build-locked thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/ps/commands git-build-locked thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/shell/commands git-build-locked thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/storage/commands git-build-locked thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/tags/commands git-build-locked thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/tar/commands git-build-locked thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ [[ 1 -eq 0 ]]
+ exit_code=0
+ set -e
+ [[ 0 -eq 10 ]]
+ implemented=1
+ [[ 0 -ne 0 ]]
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/letsencrypt/commands git-build thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/logs/commands git-build thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/nginx-vhosts/commands git-build thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/plugin/commands git-build thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/proxy/commands git-build thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/ps/commands git-build thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/shell/commands git-build thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/storage/commands git-build thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/tags/commands git-build thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/tar/commands git-build thumbor
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ [[ 1 -eq 0 ]]
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ tar_receive_app thumbor
+ declare 'desc=tar receive-app plugin trigger'
+ local trigger=tar_receive_app
+ local APP=thumbor
+ local REV=
+ [[ ! -f /home/dokku/thumbor/src.tar ]]
+ true
+ implemented=1
+ [[ 1 -eq 0 ]]
+ [[ 1 -eq 0 ]]
+ exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment