Skip to content

Instantly share code, notes, and snippets.

@jcrben jcrben/dokku-error-1
Created Aug 12, 2017

Embed
What would you like to do?
dokku-trace-build-config-erro
ubuntu@ubuntu-xenial:~$ dokku nginx:build-config pathhero
+ export DOKKU_DISTRO
++ . /etc/os-release
++ echo 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 nginx:build-config pathhero
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=("$@")
+ local args
+ for arg in '"$@"'
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ next_index=2
+ for arg in '"$@"'
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ next_index=3
+ return 0
+ args=("$@")
+ skip_arg=false
+ [[ nginx:build-config =~ ^--.* ]]
+ 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
+ [[ ubuntu != \d\o\k\k\u ]]
+ [[ ! nginx:build-config =~ plugin:* ]]
+ [[ ! nginx:build-config == \s\s\h\-\k\e\y\s\:\a\d\d ]]
++ id -un
+ export SSH_USER=ubuntu
+ SSH_USER=ubuntu
+ sudo -u dokku -E -H /usr/bin/dokku nginx:build-config pathhero
+ export DOKKU_DISTRO
++ . /etc/os-release
++ echo 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 nginx:build-config pathhero
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=("$@")
+ local args
+ for arg in '"$@"'
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ next_index=2
+ for arg in '"$@"'
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ next_index=3
+ return 0
+ args=("$@")
+ skip_arg=false
+ [[ nginx:build-config =~ ^--.* ]]
+ 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 ]]
+ [[ nginx:build-config =~ ^plugin:.* ]]
+ [[ nginx:build-config == \s\s\h\-\k\e\y\s\:\a\d\d ]]
+ [[ -n '' ]]
+ dokku_auth nginx:build-config pathhero
+ declare 'desc=calls user-auth plugin trigger'
+ export SSH_USER=ubuntu
+ SSH_USER=ubuntu
+ export SSH_NAME=default
+ SSH_NAME=default
+ plugn trigger user-auth ubuntu default nginx:build-config pathhero
+ 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
+ [[ nginx:build-config =~ (ssh-keys:add|ssh-keys:remove) ]]
+ return 0
+ case "$1" in
+ execute_dokku_cmd nginx:build-config pathhero
+ declare 'desc=executes dokku sub-commands'
+ local PLUGIN_NAME=nginx:build-config
+ local PLUGIN_CMD=nginx:build-config
+ local implemented=0
+ local script
+ argv=("$@")
+ local argv
+ case "$PLUGIN_NAME" in
+ local PLUGIN_NAME=nginx-vhosts:build-config
++ readlink -f /var/lib/dokku/plugins/enabled/nginx-vhosts
+ [[ /var/lib/dokku/core-plugins/available/nginx-vhosts == *core-plugins* ]]
+ [[ nginx:build-config == \n\g\i\n\x\:\b\u\i\l\d\-\c\o\n\f\i\g ]]
+ shift 1
+ [[ ! -z '' ]]
+ set -- nginx:build-config pathhero
+ [[ -x /var/lib/dokku/plugins/enabled/nginx-vhosts:build-config/subcommands/default ]]
+ [[ -x /var/lib/dokku/plugins/enabled/nginx-vhosts:build-config/subcommands/nginx:build-config ]]
+ [[ -x /var/lib/dokku/plugins/enabled/nginx-vhosts/subcommands/build-config ]]
+ /var/lib/dokku/plugins/enabled/nginx-vhosts/subcommands/build-config nginx:build-config pathhero
+ 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/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
+ nginx_build_config_cmd nginx:build-config pathhero
+ declare 'desc=build nginx config to proxy app containers from command line'
+ local cmd=nginx:build-config
+ [[ -z pathhero ]]
+ nginx_build_config pathhero
+ declare 'desc=build nginx config to proxy app containers using sigil'
+ local APP=pathhero
+ verify_app_name pathhero
+ declare 'desc=verify app name format and app existence'
+ local APP=pathhero
+ [[ ! -n pathhero ]]
+ [[ ! pathhero =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/pathhero ]]
+ return 0
+ local DOKKU_APP_LISTEN_PORT=
+ local DOKKU_APP_LISTEN_IP=
+ local VHOST_PATH=/home/dokku/pathhero/VHOST
+ local URLS_PATH=/home/dokku/pathhero/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/pathhero/tls
++ get_app_raw_tcp_ports pathhero
++ 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=pathhero
++ verify_app_name pathhero
++ declare 'desc=verify app name format and app existence'
++ local APP=pathhero
++ [[ ! -n pathhero ]]
++ [[ ! pathhero =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/pathhero ]]
++ return 0
+++ config_get pathhero DOKKU_DOCKERFILE_PORTS
+++ declare 'desc=get value of given config var'
+++ [[ pathhero == \c\o\n\f\i\g\:\g\e\t ]]
+++ set -- config:get pathhero DOKKU_DOCKERFILE_PORTS
+++ config_parse_args config:get pathhero 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 '"$@"'
+++ [[ pathhero == \-\-\g\l\o\b\a\l ]]
+++ [[ pathhero == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ pathhero == \-\-\e\x\p\o\r\t ]]
+++ [[ pathhero == \-\-\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 pathhero 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 pathhero DOKKU_DOCKERFILE_PORTS
+++ local SANITIZED_ARGS
+++ set -- config:get pathhero DOKKU_DOCKERFILE_PORTS
+++ DOKKU_CONFIG_TYPE=app
+++ DOKKU_CONFIG_RESTART=true
+++ [[ app == \a\p\p ]]
+++ [[ -z pathhero ]]
+++ verify_app_name pathhero
+++ declare 'desc=verify app name format and app existence'
+++ local APP=pathhero
+++ [[ ! -n pathhero ]]
+++ [[ ! pathhero =~ ^[a-z].* ]]
+++ [[ ! -d /home/dokku/pathhero ]]
+++ return 0
+++ APP=pathhero
+++ ENV_FILE=/home/dokku/pathhero/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 pathhero 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 pathhero DOKKU_DOCKERFILE_PORTS
+++ local SANITIZED_ARGS
+++ set -- config:get pathhero DOKKU_DOCKERFILE_PORTS
+++ [[ -z pathhero ]]
+++ config_create /home/dokku/pathhero/ENV
+++ declare 'desc=create config env file'
+++ local ENV_FILE=/home/dokku/pathhero/ENV
+++ [[ -f /home/dokku/pathhero/ENV ]]
+++ [[ ! -s /home/dokku/pathhero/ENV ]]
+++ local KEY=DOKKU_DOCKERFILE_PORTS
+++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/pathhero/ENV
+++ grep '^export DOKKU_DOCKERFILE_PORTS='
+++ cut -d= -f2-
+++ sed -e 's/^'\''//' -e 's/'\''$//'
++ local DOCKERFILE_PORTS=
+++ echo ''
+++ xargs
++ local raw_tcp_ports=
++ echo ''
+ local RAW_TCP_PORTS=
++ config_get pathhero DOKKU_DISABLE_PROXY
++ declare 'desc=get value of given config var'
++ [[ pathhero == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get pathhero DOKKU_DISABLE_PROXY
++ config_parse_args config:get pathhero 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 '"$@"'
++ [[ pathhero == \-\-\g\l\o\b\a\l ]]
++ [[ pathhero == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ pathhero == \-\-\e\x\p\o\r\t ]]
++ [[ pathhero == \-\-\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 pathhero 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 pathhero DOKKU_DISABLE_PROXY
++ local SANITIZED_ARGS
++ set -- config:get pathhero DOKKU_DISABLE_PROXY
++ DOKKU_CONFIG_TYPE=app
++ DOKKU_CONFIG_RESTART=true
++ [[ app == \a\p\p ]]
++ [[ -z pathhero ]]
++ verify_app_name pathhero
++ declare 'desc=verify app name format and app existence'
++ local APP=pathhero
++ [[ ! -n pathhero ]]
++ [[ ! pathhero =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/pathhero ]]
++ return 0
++ APP=pathhero
++ ENV_FILE=/home/dokku/pathhero/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 pathhero 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 pathhero DOKKU_DISABLE_PROXY
++ local SANITIZED_ARGS
++ set -- config:get pathhero DOKKU_DISABLE_PROXY
++ [[ -z pathhero ]]
++ config_create /home/dokku/pathhero/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/pathhero/ENV
++ [[ -f /home/dokku/pathhero/ENV ]]
++ [[ ! -s /home/dokku/pathhero/ENV ]]
++ local KEY=DOKKU_DISABLE_PROXY
++ cut -d= -f2-
++ sed -e 's/^'\''//' -e 's/'\''$//'
++ grep '^export DOKKU_DISABLE_PROXY='
++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/pathhero/ENV
+ local DOKKU_DISABLE_PROXY=
++ is_app_vhost_enabled pathhero
++ 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=pathhero
++ verify_app_name pathhero
++ declare 'desc=verify app name format and app existence'
++ local APP=pathhero
++ [[ ! -n pathhero ]]
++ [[ ! pathhero =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/pathhero ]]
++ return 0
+++ config_get pathhero NO_VHOST
+++ declare 'desc=get value of given config var'
+++ [[ pathhero == \c\o\n\f\i\g\:\g\e\t ]]
+++ set -- config:get pathhero NO_VHOST
+++ config_parse_args config:get pathhero 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 '"$@"'
+++ [[ pathhero == \-\-\g\l\o\b\a\l ]]
+++ [[ pathhero == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ pathhero == \-\-\e\x\p\o\r\t ]]
+++ [[ pathhero == \-\-\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 pathhero 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 pathhero NO_VHOST
+++ local SANITIZED_ARGS
+++ set -- config:get pathhero NO_VHOST
+++ DOKKU_CONFIG_TYPE=app
+++ DOKKU_CONFIG_RESTART=true
+++ [[ app == \a\p\p ]]
+++ [[ -z pathhero ]]
+++ verify_app_name pathhero
+++ declare 'desc=verify app name format and app existence'
+++ local APP=pathhero
+++ [[ ! -n pathhero ]]
+++ [[ ! pathhero =~ ^[a-z].* ]]
+++ [[ ! -d /home/dokku/pathhero ]]
+++ return 0
+++ APP=pathhero
+++ ENV_FILE=/home/dokku/pathhero/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 pathhero 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 pathhero NO_VHOST
+++ local SANITIZED_ARGS
+++ set -- config:get pathhero NO_VHOST
+++ [[ -z pathhero ]]
+++ config_create /home/dokku/pathhero/ENV
+++ declare 'desc=create config env file'
+++ local ENV_FILE=/home/dokku/pathhero/ENV
+++ [[ -f /home/dokku/pathhero/ENV ]]
+++ [[ ! -s /home/dokku/pathhero/ENV ]]
+++ local KEY=NO_VHOST
+++ cut -d= -f2-
+++ sed -e 's/^'\''//' -e 's/'\''$//'
+++ grep '^export NO_VHOST='
+++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/pathhero/ENV
++ local NO_VHOST=1
++ local APP_VHOST_ENABLED=true
++ [[ 1 == \1 ]]
++ local APP_VHOST_ENABLED=false
++ echo false
+ local IS_APP_VHOST_ENABLED=false
+ [[ -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/pathhero/PORT.web.1
+ local DOKKU_APP_LISTENER_IP=172.17.0.7
+ local DOKKU_APP_LISTENER_PORT=5000
+ local 'DOKKU_APP_LISTENERS+=172.17.0.7:5000 '
++ echo '172.17.0.7:5000 '
++ xargs
+ local DOKKU_APP_LISTENERS=172.17.0.7:5000
+ shopt -u nullglob
+ configure_nginx_ports pathhero
+ declare 'desc=configure nginx listening ports'
+ local APP=pathhero
+ verify_app_name pathhero
+ declare 'desc=verify app name format and app existence'
+ local APP=pathhero
+ [[ ! -n pathhero ]]
+ [[ ! pathhero =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/pathhero ]]
+ return 0
++ get_app_raw_tcp_ports pathhero
++ 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=pathhero
++ verify_app_name pathhero
++ declare 'desc=verify app name format and app existence'
++ local APP=pathhero
++ [[ ! -n pathhero ]]
++ [[ ! pathhero =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/pathhero ]]
++ return 0
+++ config_get pathhero DOKKU_DOCKERFILE_PORTS
+++ declare 'desc=get value of given config var'
+++ [[ pathhero == \c\o\n\f\i\g\:\g\e\t ]]
+++ set -- config:get pathhero DOKKU_DOCKERFILE_PORTS
+++ config_parse_args config:get pathhero 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 '"$@"'
+++ [[ pathhero == \-\-\g\l\o\b\a\l ]]
+++ [[ pathhero == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ pathhero == \-\-\e\x\p\o\r\t ]]
+++ [[ pathhero == \-\-\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 pathhero 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 pathhero DOKKU_DOCKERFILE_PORTS
+++ local SANITIZED_ARGS
+++ set -- config:get pathhero DOKKU_DOCKERFILE_PORTS
+++ DOKKU_CONFIG_TYPE=app
+++ DOKKU_CONFIG_RESTART=true
+++ [[ app == \a\p\p ]]
+++ [[ -z pathhero ]]
+++ verify_app_name pathhero
+++ declare 'desc=verify app name format and app existence'
+++ local APP=pathhero
+++ [[ ! -n pathhero ]]
+++ [[ ! pathhero =~ ^[a-z].* ]]
+++ [[ ! -d /home/dokku/pathhero ]]
+++ return 0
+++ APP=pathhero
+++ ENV_FILE=/home/dokku/pathhero/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 pathhero 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 pathhero DOKKU_DOCKERFILE_PORTS
+++ local SANITIZED_ARGS
+++ set -- config:get pathhero DOKKU_DOCKERFILE_PORTS
+++ [[ -z pathhero ]]
+++ config_create /home/dokku/pathhero/ENV
+++ declare 'desc=create config env file'
+++ local ENV_FILE=/home/dokku/pathhero/ENV
+++ [[ -f /home/dokku/pathhero/ENV ]]
+++ [[ ! -s /home/dokku/pathhero/ENV ]]
+++ local KEY=DOKKU_DOCKERFILE_PORTS
+++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/pathhero/ENV
+++ sed -e 's/^'\''//' -e 's/'\''$//'
+++ cut -d= -f2-
+++ grep '^export DOKKU_DOCKERFILE_PORTS='
++ local DOCKERFILE_PORTS=
+++ echo ''
+++ xargs
++ local raw_tcp_ports=
++ echo ''
+ local RAW_TCP_PORTS=
++ config_get pathhero DOKKU_NGINX_PORT
++ declare 'desc=get value of given config var'
++ [[ pathhero == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get pathhero DOKKU_NGINX_PORT
++ config_parse_args config:get pathhero 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 '"$@"'
++ [[ pathhero == \-\-\g\l\o\b\a\l ]]
++ [[ pathhero == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ pathhero == \-\-\e\x\p\o\r\t ]]
++ [[ pathhero == \-\-\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 pathhero 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 pathhero DOKKU_NGINX_PORT
++ local SANITIZED_ARGS
++ set -- config:get pathhero DOKKU_NGINX_PORT
++ DOKKU_CONFIG_TYPE=app
++ DOKKU_CONFIG_RESTART=true
++ [[ app == \a\p\p ]]
++ [[ -z pathhero ]]
++ verify_app_name pathhero
++ declare 'desc=verify app name format and app existence'
++ local APP=pathhero
++ [[ ! -n pathhero ]]
++ [[ ! pathhero =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/pathhero ]]
++ return 0
++ APP=pathhero
++ ENV_FILE=/home/dokku/pathhero/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 pathhero 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 pathhero DOKKU_NGINX_PORT
++ local SANITIZED_ARGS
++ set -- config:get pathhero DOKKU_NGINX_PORT
++ [[ -z pathhero ]]
++ config_create /home/dokku/pathhero/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/pathhero/ENV
++ [[ -f /home/dokku/pathhero/ENV ]]
++ [[ ! -s /home/dokku/pathhero/ENV ]]
++ local KEY=DOKKU_NGINX_PORT
++ cut -d= -f2-
++ sed -e 's/^'\''//' -e 's/'\''$//'
++ grep '^export DOKKU_NGINX_PORT='
++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/pathhero/ENV
+ local DOKKU_NGINX_PORT=54565
++ config_get pathhero DOKKU_NGINX_SSL_PORT
++ declare 'desc=get value of given config var'
++ [[ pathhero == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get pathhero DOKKU_NGINX_SSL_PORT
++ config_parse_args config:get pathhero 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 '"$@"'
++ [[ pathhero == \-\-\g\l\o\b\a\l ]]
++ [[ pathhero == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ pathhero == \-\-\e\x\p\o\r\t ]]
++ [[ pathhero == \-\-\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 pathhero 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 pathhero DOKKU_NGINX_SSL_PORT
++ local SANITIZED_ARGS
++ set -- config:get pathhero DOKKU_NGINX_SSL_PORT
++ DOKKU_CONFIG_TYPE=app
++ DOKKU_CONFIG_RESTART=true
++ [[ app == \a\p\p ]]
++ [[ -z pathhero ]]
++ verify_app_name pathhero
++ declare 'desc=verify app name format and app existence'
++ local APP=pathhero
++ [[ ! -n pathhero ]]
++ [[ ! pathhero =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/pathhero ]]
++ return 0
++ APP=pathhero
++ ENV_FILE=/home/dokku/pathhero/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 pathhero 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 pathhero DOKKU_NGINX_SSL_PORT
++ local SANITIZED_ARGS
++ set -- config:get pathhero DOKKU_NGINX_SSL_PORT
++ [[ -z pathhero ]]
++ config_create /home/dokku/pathhero/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/pathhero/ENV
++ [[ -f /home/dokku/pathhero/ENV ]]
++ [[ ! -s /home/dokku/pathhero/ENV ]]
++ local KEY=DOKKU_NGINX_SSL_PORT
++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/pathhero/ENV
++ grep '^export DOKKU_NGINX_SSL_PORT='
++ cut -d= -f2-
++ sed -e 's/^'\''//' -e 's/'\''$//'
+ local DOKKU_NGINX_SSL_PORT=
++ config_get pathhero DOKKU_PROXY_PORT_MAP
++ declare 'desc=get value of given config var'
++ [[ pathhero == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get pathhero DOKKU_PROXY_PORT_MAP
++ config_parse_args config:get pathhero DOKKU_PROXY_PORT_MAP
++ 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 '"$@"'
++ [[ pathhero == \-\-\g\l\o\b\a\l ]]
++ [[ pathhero == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ pathhero == \-\-\e\x\p\o\r\t ]]
++ [[ pathhero == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ DOKKU_PROXY_PORT_MAP == \-\-\g\l\o\b\a\l ]]
++ [[ DOKKU_PROXY_PORT_MAP == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ DOKKU_PROXY_PORT_MAP == \-\-\e\x\p\o\r\t ]]
++ [[ DOKKU_PROXY_PORT_MAP == \-\-\s\h\e\l\l ]]
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get pathhero DOKKU_PROXY_PORT_MAP
+++ 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 pathhero DOKKU_PROXY_PORT_MAP
++ local SANITIZED_ARGS
++ set -- config:get pathhero DOKKU_PROXY_PORT_MAP
++ DOKKU_CONFIG_TYPE=app
++ DOKKU_CONFIG_RESTART=true
++ [[ app == \a\p\p ]]
++ [[ -z pathhero ]]
++ verify_app_name pathhero
++ declare 'desc=verify app name format and app existence'
++ local APP=pathhero
++ [[ ! -n pathhero ]]
++ [[ ! pathhero =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/pathhero ]]
++ return 0
++ APP=pathhero
++ ENV_FILE=/home/dokku/pathhero/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 pathhero DOKKU_PROXY_PORT_MAP
+++ 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 pathhero DOKKU_PROXY_PORT_MAP
++ local SANITIZED_ARGS
++ set -- config:get pathhero DOKKU_PROXY_PORT_MAP
++ [[ -z pathhero ]]
++ config_create /home/dokku/pathhero/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/pathhero/ENV
++ [[ -f /home/dokku/pathhero/ENV ]]
++ [[ ! -s /home/dokku/pathhero/ENV ]]
++ local KEY=DOKKU_PROXY_PORT_MAP
++ grep '^export DOKKU_PROXY_PORT_MAP='
++ sed -e 's/^'\''//' -e 's/'\''$//'
++ cut -d= -f2-
++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/pathhero/ENV
+ local DOKKU_PROXY_PORT_MAP=http:54565:5000
++ is_app_vhost_enabled pathhero
++ 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=pathhero
++ verify_app_name pathhero
++ declare 'desc=verify app name format and app existence'
++ local APP=pathhero
++ [[ ! -n pathhero ]]
++ [[ ! pathhero =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/pathhero ]]
++ return 0
+++ config_get pathhero NO_VHOST
+++ declare 'desc=get value of given config var'
+++ [[ pathhero == \c\o\n\f\i\g\:\g\e\t ]]
+++ set -- config:get pathhero NO_VHOST
+++ config_parse_args config:get pathhero 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 '"$@"'
+++ [[ pathhero == \-\-\g\l\o\b\a\l ]]
+++ [[ pathhero == \-\-\n\o\-\r\e\s\t\a\r\t ]]
+++ [[ pathhero == \-\-\e\x\p\o\r\t ]]
+++ [[ pathhero == \-\-\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 pathhero 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 pathhero NO_VHOST
+++ local SANITIZED_ARGS
+++ set -- config:get pathhero NO_VHOST
+++ DOKKU_CONFIG_TYPE=app
+++ DOKKU_CONFIG_RESTART=true
+++ [[ app == \a\p\p ]]
+++ [[ -z pathhero ]]
+++ verify_app_name pathhero
+++ declare 'desc=verify app name format and app existence'
+++ local APP=pathhero
+++ [[ ! -n pathhero ]]
+++ [[ ! pathhero =~ ^[a-z].* ]]
+++ [[ ! -d /home/dokku/pathhero ]]
+++ return 0
+++ APP=pathhero
+++ ENV_FILE=/home/dokku/pathhero/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 pathhero 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 pathhero NO_VHOST
+++ local SANITIZED_ARGS
+++ set -- config:get pathhero NO_VHOST
+++ [[ -z pathhero ]]
+++ config_create /home/dokku/pathhero/ENV
+++ declare 'desc=create config env file'
+++ local ENV_FILE=/home/dokku/pathhero/ENV
+++ [[ -f /home/dokku/pathhero/ENV ]]
+++ [[ ! -s /home/dokku/pathhero/ENV ]]
+++ local KEY=NO_VHOST
+++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/pathhero/ENV
+++ sed -e 's/^'\''//' -e 's/'\''$//'
+++ cut -d= -f2-
+++ grep '^export NO_VHOST='
++ local NO_VHOST=1
++ local APP_VHOST_ENABLED=true
++ [[ 1 == \1 ]]
++ local APP_VHOST_ENABLED=false
++ echo false
+ local IS_APP_VHOST_ENABLED=false
+ local UPSTREAM_PORT=5000
+ [[ -z 54565 ]]
+ [[ -z '' ]]
+ is_ssl_enabled pathhero
+ declare 'desc=returns 0 if ssl is enabled for given app'
+ local APP=pathhero
+ verify_app_name pathhero
+ declare 'desc=verify app name format and app existence'
+ local APP=pathhero
+ [[ ! -n pathhero ]]
+ [[ ! pathhero =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/pathhero ]]
+ return 0
+ local APP_SSL_PATH=/home/dokku/pathhero/tls
+ [[ -e /home/dokku/pathhero/tls/server.crt ]]
+ return 1
+ [[ -z http:54565:5000 ]]
++ config_get pathhero DOKKU_NGINX_PORT
++ declare 'desc=get value of given config var'
++ [[ pathhero == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get pathhero DOKKU_NGINX_PORT
++ config_parse_args config:get pathhero 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 '"$@"'
++ [[ pathhero == \-\-\g\l\o\b\a\l ]]
++ [[ pathhero == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ pathhero == \-\-\e\x\p\o\r\t ]]
++ [[ pathhero == \-\-\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 pathhero 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 pathhero DOKKU_NGINX_PORT
++ local SANITIZED_ARGS
++ set -- config:get pathhero DOKKU_NGINX_PORT
++ DOKKU_CONFIG_TYPE=app
++ DOKKU_CONFIG_RESTART=true
++ [[ app == \a\p\p ]]
++ [[ -z pathhero ]]
++ verify_app_name pathhero
++ declare 'desc=verify app name format and app existence'
++ local APP=pathhero
++ [[ ! -n pathhero ]]
++ [[ ! pathhero =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/pathhero ]]
++ return 0
++ APP=pathhero
++ ENV_FILE=/home/dokku/pathhero/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 pathhero 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 pathhero DOKKU_NGINX_PORT
++ local SANITIZED_ARGS
++ set -- config:get pathhero DOKKU_NGINX_PORT
++ [[ -z pathhero ]]
++ config_create /home/dokku/pathhero/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/pathhero/ENV
++ [[ -f /home/dokku/pathhero/ENV ]]
++ [[ ! -s /home/dokku/pathhero/ENV ]]
++ local KEY=DOKKU_NGINX_PORT
++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/pathhero/ENV
++ sed -e 's/^'\''//' -e 's/'\''$//'
++ cut -d= -f2-
++ grep '^export DOKKU_NGINX_PORT='
+ local NGINX_PORT=54565
++ config_get pathhero DOKKU_NGINX_SSL_PORT
++ declare 'desc=get value of given config var'
++ [[ pathhero == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get pathhero DOKKU_NGINX_SSL_PORT
++ config_parse_args config:get pathhero 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 '"$@"'
++ [[ pathhero == \-\-\g\l\o\b\a\l ]]
++ [[ pathhero == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ pathhero == \-\-\e\x\p\o\r\t ]]
++ [[ pathhero == \-\-\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 pathhero 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 pathhero DOKKU_NGINX_SSL_PORT
++ local SANITIZED_ARGS
++ set -- config:get pathhero DOKKU_NGINX_SSL_PORT
++ DOKKU_CONFIG_TYPE=app
++ DOKKU_CONFIG_RESTART=true
++ [[ app == \a\p\p ]]
++ [[ -z pathhero ]]
++ verify_app_name pathhero
++ declare 'desc=verify app name format and app existence'
++ local APP=pathhero
++ [[ ! -n pathhero ]]
++ [[ ! pathhero =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/pathhero ]]
++ return 0
++ APP=pathhero
++ ENV_FILE=/home/dokku/pathhero/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 pathhero 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 pathhero DOKKU_NGINX_SSL_PORT
++ local SANITIZED_ARGS
++ set -- config:get pathhero DOKKU_NGINX_SSL_PORT
++ [[ -z pathhero ]]
++ config_create /home/dokku/pathhero/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/pathhero/ENV
++ [[ -f /home/dokku/pathhero/ENV ]]
++ [[ ! -s /home/dokku/pathhero/ENV ]]
++ local KEY=DOKKU_NGINX_SSL_PORT
++ grep '^export DOKKU_NGINX_SSL_PORT='
++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/pathhero/ENV
++ cut -d= -f2-
++ sed -e 's/^'\''//' -e 's/'\''$//'
+ local NGINX_SSL_PORT=
++ config_get pathhero DOKKU_PROXY_PORT_MAP
++ declare 'desc=get value of given config var'
++ [[ pathhero == \c\o\n\f\i\g\:\g\e\t ]]
++ set -- config:get pathhero DOKKU_PROXY_PORT_MAP
++ config_parse_args config:get pathhero DOKKU_PROXY_PORT_MAP
++ 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 '"$@"'
++ [[ pathhero == \-\-\g\l\o\b\a\l ]]
++ [[ pathhero == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ pathhero == \-\-\e\x\p\o\r\t ]]
++ [[ pathhero == \-\-\s\h\e\l\l ]]
++ for var in '"$@"'
++ [[ DOKKU_PROXY_PORT_MAP == \-\-\g\l\o\b\a\l ]]
++ [[ DOKKU_PROXY_PORT_MAP == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++ [[ DOKKU_PROXY_PORT_MAP == \-\-\e\x\p\o\r\t ]]
++ [[ DOKKU_PROXY_PORT_MAP == \-\-\s\h\e\l\l ]]
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
+++ get_sanitized_config_args config:get pathhero DOKKU_PROXY_PORT_MAP
+++ 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 pathhero DOKKU_PROXY_PORT_MAP
++ local SANITIZED_ARGS
++ set -- config:get pathhero DOKKU_PROXY_PORT_MAP
++ DOKKU_CONFIG_TYPE=app
++ DOKKU_CONFIG_RESTART=true
++ [[ app == \a\p\p ]]
++ [[ -z pathhero ]]
++ verify_app_name pathhero
++ declare 'desc=verify app name format and app existence'
++ local APP=pathhero
++ [[ ! -n pathhero ]]
++ [[ ! pathhero =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/pathhero ]]
++ return 0
++ APP=pathhero
++ ENV_FILE=/home/dokku/pathhero/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 pathhero DOKKU_PROXY_PORT_MAP
+++ 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 pathhero DOKKU_PROXY_PORT_MAP
++ local SANITIZED_ARGS
++ set -- config:get pathhero DOKKU_PROXY_PORT_MAP
++ [[ -z pathhero ]]
++ config_create /home/dokku/pathhero/ENV
++ declare 'desc=create config env file'
++ local ENV_FILE=/home/dokku/pathhero/ENV
++ [[ -f /home/dokku/pathhero/ENV ]]
++ [[ ! -s /home/dokku/pathhero/ENV ]]
++ local KEY=DOKKU_PROXY_PORT_MAP
++ grep '^export DOKKU_PROXY_PORT_MAP='
++ sed -e 's/^'\''//' -e 's/'\''$//'
++ cut -d= -f2-
++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/pathhero/ENV
+ local PROXY_PORT_MAP=http:54565:5000
+ local PORT_MAP
+ for PORT_MAP in '$PROXY_PORT_MAP'
++ awk -F : '{ print $3 }'
+ local PROXY_UPSTREAM_PORT=5000
++ is_val_in_list 5000 '' ' '
++ declare 'desc=return true if value (5000) is in list () separated by delimiter ( ); delimiter defaults to comma'
++ local value=5000 list= 'delimiter= '
++ local 'IFS= ' val_in_list=false
++ echo false
+ [[ false == \f\a\l\s\e ]]
+ local 'PROXY_UPSTREAM_PORTS+=5000 '
++ echo '5000 '
++ xargs
+ local PROXY_UPSTREAM_PORTS=5000
++ mktemp -d /tmp/dokku_nginx_template.XXXXX
+ local NGINX_BUILD_CONFIG_TMP_WORK_DIR=/tmp/dokku_nginx_template.lMlPx
++ mktemp --tmpdir=/tmp/dokku_nginx_template.lMlPx nginx.conf.XXXXXX
+ local NGINX_CONF=/tmp/dokku_nginx_template.lMlPx/nginx.conf.VeenkS
+ local CUSTOM_NGINX_TEMPLATE=/tmp/dokku_nginx_template.lMlPx/nginx.conf.sigil
+ trap 'rm -rf $NGINX_CONF $NGINX_BUILD_CONFIG_TMP_WORK_DIR > /dev/null' RETURN INT TERM EXIT
+ get_custom_nginx_template pathhero /tmp/dokku_nginx_template.lMlPx/nginx.conf.sigil
+ declare 'desc=attempts to copy custom nginx template from app image'
+ local APP=pathhero
+ verify_app_name pathhero
+ declare 'desc=verify app name format and app existence'
+ local APP=pathhero
+ [[ ! -n pathhero ]]
+ [[ ! pathhero =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/pathhero ]]
+ return 0
+ local DESTINATION=/tmp/dokku_nginx_template.lMlPx/nginx.conf.sigil
++ get_running_image_tag pathhero
++ declare 'desc=retrieve current image tag for a given app. returns empty string if no deployed containers are found'
++ local APP=pathhero
++ [[ ! -n pathhero ]]
++ verify_app_name pathhero
++ declare 'desc=verify app name format and app existence'
++ local APP=pathhero
++ [[ ! -n pathhero ]]
++ [[ ! pathhero =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/pathhero ]]
++ return 0
++ CIDS=($(get_app_container_ids "$APP"))
+++ get_app_container_ids pathhero
+++ declare 'desc=returns list of docker container ids for given app and optional container_type'
+++ local APP=pathhero
+++ local CONTAINER_TYPE=
+++ verify_app_name pathhero
+++ declare 'desc=verify app name format and app existence'
+++ local APP=pathhero
+++ [[ ! -n pathhero ]]
+++ [[ ! pathhero =~ ^[a-z].* ]]
+++ [[ ! -d /home/dokku/pathhero ]]
+++ return 0
+++ [[ -f /home/dokku/pathhero/CONTAINER ]]
+++ [[ -n '' ]]
+++ local 'CONTAINER_PATTERN=/home/dokku/pathhero/CONTAINER.*'
+++ shopt -s nullglob
+++ local DOKKU_CID_FILE
+++ for DOKKU_CID_FILE in '$CONTAINER_PATTERN'
+++ local 'DOKKU_CIDS+= '
+++ local DOKKU_CIDS+=5a07442c65ef005088100f8fb7568f1495c46170ac9edb3ee0522c84c2f11c58
+++ local 'DOKKU_CIDS+= '
+++ shopt -u nullglob
+++ echo ' 5a07442c65ef005088100f8fb7568f1495c46170ac9edb3ee0522c84c2f11c58 '
++ local CIDS
+++ docker inspect -f '{{ .Config.Image }}' 5a07442c65ef005088100f8fb7568f1495c46170ac9edb3ee0522c84c2f11c58
+++ awk -F: '{ print $2 }'
++ local RUNNING_IMAGE_TAG=latest
++ echo latest
+ local IMAGE_TAG=latest
++ get_deploying_app_image_name pathhero latest
++ declare 'desc=return deploying image identifier for a given app, tag tuple. validate if tag is presented'
++ local APP=pathhero
++ local IMAGE_TAG=latest
++ IMAGE_REPO=
++ [[ -z pathhero ]]
+++ plugn trigger deployed-app-repository pathhero
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
++ local IMAGE_REMOTE_REPOSITORY=
+++ plugn trigger deployed-app-image-tag pathhero
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
++ local NEW_IMAGE_TAG=
+++ plugn trigger deployed-app-image-repo pathhero
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
++ local NEW_IMAGE_REPO=
++ [[ -n '' ]]
++ [[ -n '' ]]
++ [[ -z '' ]]
+++ get_app_image_repo pathhero
+++ declare 'desc=central definition of image repo pattern'
+++ local APP=pathhero
+++ local IMAGE_REPO=dokku/pathhero
+++ [[ -z pathhero ]]
+++ echo dokku/pathhero
++ IMAGE_REPO=dokku/pathhero
++ [[ -z latest ]]
++ local IMAGE=dokku/pathhero:latest
++ verify_image dokku/pathhero:latest
++ declare 'desc=verify image existence'
++ local IMAGE=dokku/pathhero:latest
++ docker inspect dokku/pathhero:latest
++ return 0
++ echo dokku/pathhero:latest
+ local IMAGE=dokku/pathhero:latest
+ local NGINX_TEMPLATE_NAME=nginx.conf.sigil
+ copy_from_image dokku/pathhero:latest nginx.conf.sigil /tmp/dokku_nginx_template.lMlPx/nginx.conf.sigil
+ [[ -f /tmp/dokku_nginx_template.lMlPx/nginx.conf.sigil ]]
++ get_app_domains pathhero
++ declare 'desc=return app domains'
++ verify_app_name pathhero
++ declare 'desc=verify app name format and app existence'
++ local APP=pathhero
++ [[ ! -n pathhero ]]
++ [[ ! pathhero =~ ^[a-z].* ]]
++ [[ ! -d /home/dokku/pathhero ]]
++ return 0
++ local APP=pathhero
++ local APP_VHOST_FILE=/home/dokku/pathhero/VHOST
++ local GLOBAL_VHOST_PATH=/home/dokku/VHOST
++ local GLOBAL_HOSTNAME_PATH=/home/dokku/HOSTNAME
+++ is_app_vhost_enabled pathhero
+++ 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=pathhero
+++ verify_app_name pathhero
+++ declare 'desc=verify app name format and app existence'
+++ local APP=pathhero
+++ [[ ! -n pathhero ]]
+++ [[ ! pathhero =~ ^[a-z].* ]]
+++ [[ ! -d /home/dokku/pathhero ]]
+++ return 0
++++ config_get pathhero NO_VHOST
++++ declare 'desc=get value of given config var'
++++ [[ pathhero == \c\o\n\f\i\g\:\g\e\t ]]
++++ set -- config:get pathhero NO_VHOST
++++ config_parse_args config:get pathhero 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 '"$@"'
++++ [[ pathhero == \-\-\g\l\o\b\a\l ]]
++++ [[ pathhero == \-\-\n\o\-\r\e\s\t\a\r\t ]]
++++ [[ pathhero == \-\-\e\x\p\o\r\t ]]
++++ [[ pathhero == \-\-\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 pathhero 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 pathhero NO_VHOST
++++ local SANITIZED_ARGS
++++ set -- config:get pathhero NO_VHOST
++++ DOKKU_CONFIG_TYPE=app
++++ DOKKU_CONFIG_RESTART=true
++++ [[ app == \a\p\p ]]
++++ [[ -z pathhero ]]
++++ verify_app_name pathhero
++++ declare 'desc=verify app name format and app existence'
++++ local APP=pathhero
++++ [[ ! -n pathhero ]]
++++ [[ ! pathhero =~ ^[a-z].* ]]
++++ [[ ! -d /home/dokku/pathhero ]]
++++ return 0
++++ APP=pathhero
++++ ENV_FILE=/home/dokku/pathhero/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 pathhero 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 pathhero NO_VHOST
++++ local SANITIZED_ARGS
++++ set -- config:get pathhero NO_VHOST
++++ [[ -z pathhero ]]
++++ config_create /home/dokku/pathhero/ENV
++++ declare 'desc=create config env file'
++++ local ENV_FILE=/home/dokku/pathhero/ENV
++++ [[ -f /home/dokku/pathhero/ENV ]]
++++ [[ ! -s /home/dokku/pathhero/ENV ]]
++++ local KEY=NO_VHOST
++++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/pathhero/ENV
++++ grep '^export NO_VHOST='
++++ sed -e 's/^'\''//' -e 's/'\''$//'
++++ cut -d= -f2-
+++ local NO_VHOST=1
+++ local APP_VHOST_ENABLED=true
+++ [[ 1 == \1 ]]
+++ local APP_VHOST_ENABLED=false
+++ echo false
++ [[ false == \t\r\u\e ]]
+ local NONSSL_VHOSTS=
++ echo ''
++ xargs
+ local NOSSL_SERVER_NAME=
+ is_ssl_enabled pathhero
+ declare 'desc=returns 0 if ssl is enabled for given app'
+ local APP=pathhero
+ verify_app_name pathhero
+ declare 'desc=verify app name format and app existence'
+ local APP=pathhero
+ [[ ! -n pathhero ]]
+ [[ ! pathhero =~ ^[a-z].* ]]
+ [[ ! -d /home/dokku/pathhero ]]
+ return 0
+ local APP_SSL_PATH=/home/dokku/pathhero/tls
+ [[ -e /home/dokku/pathhero/tls/server.crt ]]
+ return 1
++ nginx -v
++ cut -d/ -f 2
+ local 'NGINX_VERSION=1.10.3 (Ubuntu)'
++ is_spdy_enabled '1.10.3 (Ubuntu)'
++ declare 'desc=detects whether the installed nginx version has spdy support'
++ local 'NGINX_VERSION=1.10.3 (Ubuntu)'
++ local MAJOR_VERSION MINOR_VERSION PATCH_VERSION
++ local HAS_SUPPORT=true
++ which nginx
+++ echo '1.10.3 (Ubuntu)'
+++ awk '{split($0,a,"."); print a[1]}'
++ MAJOR_VERSION=1
+++ echo '1.10.3 (Ubuntu)'
+++ awk '{split($0,a,"."); print a[2]}'
++ MINOR_VERSION=10
+++ echo '1.10.3 (Ubuntu)'
+++ awk '{split($0,a,"."); print a[3]}'
++ PATCH_VERSION='3 (Ubuntu)'
++ [[ 1 -ge 2 ]]
++ [[ 1 -eq 1 ]]
++ [[ 10 -ge 10 ]]
++ HAS_SUPPORT=false
++ echo false
+ local SPDY_SUPPORTED=false
++ is_http2_enabled '1.10.3 (Ubuntu)'
++ declare 'desc=detects whether the installed nginx version has http2 support'
++ local 'NGINX_VERSION=1.10.3 (Ubuntu)'
++ local MAJOR_VERSION MINOR_VERSION PATCH_VERSION
++ local HAS_SUPPORT=false
++ which nginx
+++ echo '1.10.3 (Ubuntu)'
+++ awk '{split($0,a,"."); print a[1]}'
++ MAJOR_VERSION=1
+++ echo '1.10.3 (Ubuntu)'
+++ awk '{split($0,a,"."); print a[2]}'
++ MINOR_VERSION=10
+++ echo '1.10.3 (Ubuntu)'
+++ awk '{split($0,a,"."); print a[3]}'
++ PATCH_VERSION='3 (Ubuntu)'
++ [[ 1 -ge 2 ]]
++ [[ 1 -eq 1 ]]
++ [[ 10 -eq 11 ]]
++ [[ 10 -ge 12 ]]
++ echo false
+ local HTTP2_SUPPORTED=false
++ config_export app pathhero
++ declare 'desc=returns export command for config variable of specified type (app/global)'
++ local CONFIG_TYPE=app
++ local APP=pathhero
++ local ENV_FILE=/home/dokku/pathhero/ENV
++ [[ app == \g\l\o\b\a\l ]]
++ [[ ! -f /home/dokku/pathhero/ENV ]]
++ [[ ! -s /home/dokku/pathhero/ENV ]]
+++ cut '-d ' -f2-
+++ grep -Eo 'export ([a-zA-Z_][a-zA-Z0-9_]*=.*)' /home/dokku/pathhero/ENV
++ local 'VARS=DOKKU_APP_TYPE='\''dockerfile'\''
DOKKU_DOCKERFILE_CMD='\''CMD mongod --fork --dbpath /data/db/pathhero \'\''
DOKKU_NGINX_PORT='\''54565'\''
DOKKU_PROXY_PORT_MAP='\''http:54565:5000'\''
NO_VHOST='\''1'\'''
++ echo 'DOKKU_APP_TYPE='\''dockerfile'\''
DOKKU_DOCKERFILE_CMD='\''CMD mongod --fork --dbpath /data/db/pathhero \'\''
DOKKU_NGINX_PORT='\''54565'\''
DOKKU_PROXY_PORT_MAP='\''http:54565:5000'\''
NO_VHOST='\''1'\'''
++ awk '{print "export " $0}'
++ return 0
+ eval 'export DOKKU_APP_TYPE='\''dockerfile'\''
export DOKKU_DOCKERFILE_CMD='\''CMD mongod --fork --dbpath /data/db/pathhero \'\''
export DOKKU_NGINX_PORT='\''54565'\''
export DOKKU_PROXY_PORT_MAP='\''http:54565:5000'\''
export NO_VHOST='\''1'\'''
++ export DOKKU_APP_TYPE=dockerfile
++ DOKKU_APP_TYPE=dockerfile
++ export 'DOKKU_DOCKERFILE_CMD=CMD mongod --fork --dbpath /data/db/pathhero \'
++ DOKKU_DOCKERFILE_CMD='CMD mongod --fork --dbpath /data/db/pathhero \'
++ export DOKKU_NGINX_PORT=54565
++ DOKKU_NGINX_PORT=54565
++ export DOKKU_PROXY_PORT_MAP=http:54565:5000
++ DOKKU_PROXY_PORT_MAP=http:54565:5000
++ export NO_VHOST=1
++ NO_VHOST=1
+ SIGIL_PARAMS=(-f $NGINX_TEMPLATE APP="$APP" DOKKU_ROOT="$DOKKU_ROOT" NOSSL_SERVER_NAME="$NOSSL_SERVER_NAME" DOKKU_APP_LISTENERS="$DOKKU_APP_LISTENERS" DOKKU_LIB_ROOT="$DOKKU_LIB_ROOT" PASSED_LISTEN_IP_PORT="$PASSED_LISTEN_IP_PORT" SPDY_SUPPORTED="$SPDY_SUPPORTED" HTTP2_SUPPORTED="$HTTP2_SUPPORTED" 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" PROXY_PORT_MAP="$PROXY_PORT_MAP" PROXY_UPSTREAM_PORTS="$PROXY_UPSTREAM_PORTS")
+ local SIGIL_PARAMS
+ xargs -i echo '-----> Configuring {}...(using built-in template)'
++ echo '' ''
++ sort -u
++ tr ' ' '\n'
+ cat -s
+ sigil -f /var/lib/dokku/plugins/available/nginx-vhosts/templates/nginx.conf.sigil APP=pathhero DOKKU_ROOT=/home/dokku NOSSL_SERVER_NAME= DOKKU_APP_LISTENERS=172.17.0.7:5000 DOKKU_LIB_ROOT=/var/lib/dokku PASSED_LISTEN_IP_PORT= SPDY_SUPPORTED=false HTTP2_SUPPORTED=false DOKKU_APP_LISTEN_PORT= DOKKU_APP_LISTEN_IP= APP_SSL_PATH=/home/dokku/pathhero/tls SSL_INUSE= SSL_SERVER_NAME= NGINX_PORT=54565 NGINX_SSL_PORT= RAW_TCP_PORTS= PROXY_PORT_MAP=http:54565:5000 PROXY_UPSTREAM_PORTS=5000
+ is_deployed pathhero
+ declare 'desc=return 0 if given app has a running container'
+ local APP=pathhero
+ [[ -f /home/dokku/pathhero/CONTAINER ]]
++ ls /home/dokku/pathhero/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'
-----> Creating http nginx.conf
+ mv /tmp/dokku_nginx_template.lMlPx/nginx.conf.VeenkS /home/dokku/pathhero/nginx.conf
+ is_deployed pathhero
+ declare 'desc=return 0 if given app has a running container'
+ local APP=pathhero
+ [[ -f /home/dokku/pathhero/CONTAINER ]]
++ ls /home/dokku/pathhero/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'
-----> Running nginx-pre-reload
+ plugn trigger nginx-pre-reload pathhero '' ''
/tmp/bashenv.665162129: line 137: syntax error near unexpected token `('
/tmp/bashenv.665162129: line 137: ` eval "$1() { '
/home/dokku/.basher/bash: main: command not found
+ rm -rf /tmp/dokku_nginx_template.lMlPx/nginx.conf.VeenkS /tmp/dokku_nginx_template.lMlPx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.