Skip to content

Instantly share code, notes, and snippets.

@georgewhewell
Created August 10, 2015 17:36
Show Gist options
  • Save georgewhewell/0426bf6ae4d391a44b84 to your computer and use it in GitHub Desktop.
Save georgewhewell/0426bf6ae4d391a44b84 to your computer and use it in GitHub Desktop.
from ubuntu:latest
run apt-get update && apt-get install -y python
run mkdir blah
cmd cd blah && python -m SimpleHTTPServer
expose 8000
server {
listen [::]:80;
listen 80;
server_name $NOSSL_SERVER_NAME;
access_log /var/log/nginx/${APP}-access.log;
error_log /var/log/nginx/${APP}-error.log;
location / {
return 301 /template_works;
}
}
@georgewhewell
Copy link
Author

+ parse_args deploy dokku-test
+ for arg in '"$@"'
+ case "$arg" in
+ for arg in '"$@"'
+ case "$arg" in
+ return 0
+ args=("$@")
+ [[ deploy =~ ^--.* ]]
+ has_tty
++ /usr/bin/tty
+ [[ /dev/pts/0 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ grw != \d\o\k\k\u ]]
+ [[ deploy != plugins-install* ]]
+ [[ deploy != \p\l\u\g\i\n\s\-\u\p\d\a\t\e ]]
+ sudo -u dokku -E -H /usr/local/bin/dokku deploy dokku-test
+ [[ -f /home/dokku/dokkurc ]]
+ [[ -d /home/dokku/.dokkurc ]]
+ for f in '$DOKKU_ROOT/.dokkurc/*'
+ source /home/dokku/.dokkurc/DOKKU_TRACE
++ export DOKKU_TRACE=1
++ DOKKU_TRACE=1
+ [[ -n 1 ]]
+ set -x
+ parse_args deploy dokku-test
+ for arg in '"$@"'
+ case "$arg" in
+ for arg in '"$@"'
+ case "$arg" in
+ return 0
+ args=("$@")
+ [[ deploy =~ ^--.* ]]
+ has_tty
++ /usr/bin/tty
+ [[ /dev/pts/0 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
+ [[ -n '' ]]
+ case "$1" in
+ APP=dokku-test
+ IMAGE=dokku/dokku-test
+ pluginhook pre-deploy dokku-test
++ dirname /var/lib/dokku/plugins/20_events/pre-deploy
+ source /var/lib/dokku/plugins/20_events/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
++ dirname /var/lib/dokku/plugins/ps/pre-deploy
+ source /var/lib/dokku/plugins/ps/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ dirname /var/lib/dokku/plugins/ps/pre-deploy
+ source /var/lib/dokku/plugins/ps/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+++ dirname /var/lib/dokku/plugins/ps/pre-deploy
++ source /var/lib/dokku/plugins/ps/../common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+ APP=dokku-test
+ generate_scale_file dokku-test
+ local APP=dokku-test
+ local IMAGE=dokku/dokku-test
+ local DOKKU_SCALE_FILE=/home/dokku/dokku-test/DOKKU_SCALE
+ copy_from_image dokku/dokku-test /app/DOKKU_SCALE /home/dokku/dokku-test
+ [[ ! -f /home/dokku/dokku-test/DOKKU_SCALE ]]
++ dirname /var/lib/dokku/plugins/psql-sc/pre-deploy
+ source /var/lib/dokku/plugins/psql-sc/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ [[ -f /home/dokku/ENV ]]
++ source /home/dokku/ENV
+++ export CURL_CONNECT_TIMEOUT=5
+++ CURL_CONNECT_TIMEOUT=5
+++ export CURL_TIMEOUT=30
+++ CURL_TIMEOUT=30
++ APP=
++ PSQL_ROOT=/home/dokku/.psql-sc
++ PSQL_IMAGE=postgres:9.3
++ PSQL_CONTAINER_NAME=psql-single-container
++ PSQL_PORT=5432
++ PSQL_HOST=postgres
+ [[ ! -f /home/dokku/.psql-sc/db_dokku-test ]]
+ exit 0
+ set +exo pipefail
+ is_image_buildstep_based dokku/dokku-test
+ [[ ! -f /home/ubuntu/.circlerc ]]
+ local DOCKER_ARGS=--rm
+ docker run --entrypoint=/bin/bash --rm dokku/dokku-test -c '[[ -f /exec ]]'
+ DOKKU_SCALE_FILE=/home/dokku/dokku-test/DOKKU_SCALE
++ get_container_ids dokku-test
++ APP=dokku-test
++ verify_app_name dokku-test
++ local APP=dokku-test
++ [[ ! -n dokku-test ]]
++ [[ ! -d /home/dokku/dokku-test ]]
++ IMAGE=dokku/dokku-test
++ return 0
++ [[ -f /home/dokku/dokku-test/CONTAINER ]]
++ shopt -s nullglob
++ for DOKKU_CID_FILE in '$DOKKU_ROOT/$APP/CONTAINER.*'
++ DOKKU_CIDS+=' '
++ DOKKU_CIDS+=fd1ba4fe7a7689ed106eed2edd8d28177b2577a705ac3feb1625c6977dd5a7dc
++ DOKKU_CIDS+=' '
++ shopt -u nullglob
++ echo fd1ba4fe7a7689ed106eed2edd8d28177b2577a705ac3feb1625c6977dd5a7dc
+ oldids=fd1ba4fe7a7689ed106eed2edd8d28177b2577a705ac3feb1625c6977dd5a7dc
+ read line
+ PROC_TYPE=web
+ PROC_COUNT=1
+ CONTAINER_INDEX=1
+ [[ 1 -le 1 ]]
+ id=
+ port=
+ ipaddr=
+ DOKKU_CONTAINER_ID_FILE=/home/dokku/dokku-test/CONTAINER.web.1
+ DOKKU_IP_FILE=/home/dokku/dokku-test/IP.web.1
+ DOKKU_PORT_FILE=/home/dokku/dokku-test/PORT.web.1
++ :
++ pluginhook docker-args dokku-test deploy
++ cat
+ STDIN=
+ APP=dokku-test
+ LINK_FILE=LINK
+ LINK_FILE_PATH=/home/dokku/dokku-test/LINK
+ output=
+ [[ -f /home/dokku/dokku-test/LINK ]]
+ echo ''
+ DOCKER_ARGS=
+ DOCKER_ARGS+=' -e DYNO=web '
++ :
++ pluginhook docker-args-deploy dokku-test
++ dirname /var/lib/dokku/plugins/20_events/docker-args-deploy
+ source /var/lib/dokku/plugins/20_events/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
++ dirname /var/lib/dokku/plugins/config/docker-args-deploy
+ source /var/lib/dokku/plugins/config/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ cat
+ STDIN=
+ APP=dokku-test
+ IMAGE=dokku/dokku-test
+ DOCKERFILE_ENV_FILE=/home/dokku/dokku-test/DOCKERFILE_ENV_FILE
+ is_image_buildstep_based dokku/dokku-test
+ [[ ! -f /home/ubuntu/.circlerc ]]
+ local DOCKER_ARGS=--rm
+ docker run --entrypoint=/bin/bash --rm dokku/dokku-test -c '[[ -f /exec ]]'
+ [[ -f /home/dokku/ENV ]]
+ sed -e 's:^export ::g' -e 's:='\'':=:g' -e 's:'\''$::g' /home/dokku/ENV
+ [[ -f /home/dokku/dokku-test/ENV ]]
+ sed -e 's:^export ::g' -e 's:='\'':=:g' -e 's:'\''$::g' /home/dokku/dokku-test/ENV
+ echo ' --env-file=/home/dokku/dokku-test/DOCKERFILE_ENV_FILE'
++ cat
+ STDIN=' --env-file=/home/dokku/dokku-test/DOCKERFILE_ENV_FILE'
+ APP=dokku-test
+ case "$0" in
+ PHASE=DEPLOY
+ FILE_PREFIX=DOCKER_OPTIONS_
+ PHASE_FILE_PATH=/home/dokku/dokku-test/DOCKER_OPTIONS_DEPLOY
+ output=
+ [[ -f /home/dokku/dokku-test/DOCKER_OPTIONS_DEPLOY ]]
+ echo ' --env-file=/home/dokku/dokku-test/DOCKERFILE_ENV_FILE'
+ DOCKER_ARGS+=' --env-file=/home/dokku/dokku-test/DOCKERFILE_ENV_FILE'
++ pluginhook bind-external-ip dokku-test
++ dirname /var/lib/dokku/plugins/20_events/bind-external-ip
+ source /var/lib/dokku/plugins/20_events/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
+ APP=dokku-test
++ dokku config:get dokku-test NO_VHOST
+ [[ -f /home/dokku/dokkurc ]]
+ [[ -d /home/dokku/.dokkurc ]]
+ for f in '$DOKKU_ROOT/.dokkurc/*'
+ source /home/dokku/.dokkurc/DOKKU_TRACE
++ export DOKKU_TRACE=1
++ DOKKU_TRACE=1
+ [[ -n 1 ]]
+ set -x
+ parse_args config:get dokku-test NO_VHOST
+ for arg in '"$@"'
+ case "$arg" in
+ for arg in '"$@"'
+ case "$arg" in
+ for arg in '"$@"'
+ case "$arg" in
+ return 0
+ args=("$@")
+ [[ config:get =~ ^--.* ]]
+ has_tty
++ /usr/bin/tty
++ true
+ [[ not a tty == \n\o\t\ \a\ \t\t\y ]]
+ return 1
+ DOKKU_QUIET_OUTPUT=1
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
+ [[ -n '' ]]
+ case "$1" in
+ implemented=0
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/00_dokku-standard/commands config:get dokku-test NO_VHOST
++ dirname /var/lib/dokku/plugins/00_dokku-standard/commands
+ source /var/lib/dokku/plugins/00_dokku-standard/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/20_events/commands config:get dokku-test NO_VHOST
++ dirname /var/lib/dokku/plugins/20_events/commands
+ source /var/lib/dokku/plugins/20_events/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ dirname /var/lib/dokku/plugins/20_events/commands
+ PLUGIN_DIR=/var/lib/dokku/plugins/20_events
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/apps/commands config:get dokku-test NO_VHOST
++ dirname /var/lib/dokku/plugins/apps/commands
+ source /var/lib/dokku/plugins/apps/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/backup/commands config:get dokku-test NO_VHOST
+ CURRENT_BACKUP_VERSION=1
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/config/commands config:get dokku-test NO_VHOST
++ dirname /var/lib/dokku/plugins/config/commands
+ source /var/lib/dokku/plugins/config/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ ENV_FILE=/home/dokku/dokku-test/ENV
+ ENV_FILE_TEMP=/home/dokku/dokku-test/ENV.tmp
+ case "$1" in
+ [[ -z dokku-test ]]
+ verify_app_name dokku-test
+ local APP=dokku-test
+ [[ ! -n dokku-test ]]
+ [[ ! -d /home/dokku/dokku-test ]]
+ IMAGE=dokku/dokku-test
+ return 0
+ APP=dokku-test
+ [[ -z NO_VHOST ]]
+ config_create
+ '[' -f /home/dokku/dokku-test/ENV ']'
+ [[ ! -s /home/dokku/dokku-test/ENV ]]
+ exit 0
+ exit_code=0
+ set -e
+ [[ 0 -eq 10 ]]
+ implemented=1
+ [[ 0 -ne 0 ]]
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/couchdb/commands config:get dokku-test NO_VHOST
+ exit_code=0
+ set -e
+ [[ 0 -eq 10 ]]
+ implemented=1
+ [[ 0 -ne 0 ]]
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/docker-options/commands config:get dokku-test NO_VHOST
++ dirname /var/lib/dokku/plugins/docker-options/commands
+ source /var/lib/dokku/plugins/docker-options/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ PHASES=(build deploy run)
+ FILE_PREFIX=DOCKER_OPTIONS_
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/domains/commands config:get dokku-test NO_VHOST
++ dirname /var/lib/dokku/plugins/domains/commands
+ source /var/lib/dokku/plug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}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe08:(:[0-9a-fA-F]{1,4}){2,2}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}([0-9]{1,3}[\.]){3}[0-9]{1,3}|([0-9a-fA-F]{1,4}:){1,4}:([0-9]{1,3}[\.]){3}[0-9]{1,3}'
+ RE_IPV4='([0-9]{1,3}[\.]){3}[0-9]{1,3}$'
+ RE_IPV6='([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe08:(:[0-9a-fA-F]{1,4}){2,2}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}([0-9]{1,3}[\.]){3}[0-9]{1,3}|([0-9a-fA-F]{1,4}:){1,4}:([0-9]{1,3}[\.]){3}[0-9]{1,3}$'
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/elasticsearch/commands config:get dokku-test NO_VHOST
+ [[ config:get == elasticsearch:* ]]
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/git/commands config:get dokku-test NO_VHOST
++ dirname /var/lib/dokku/plugins/git/commands
+ source /var/lib/dokku/plugins/git/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/link/commands config:get dokku-test NO_VHOST
+ [[ config:get == link ]]
+ [[ config:get == link:* ]]
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/nginx-vhosts/commands config:get dokku-test NO_VHOST
++ dirname /var/lib/dokku/plugins/nginx-vhosts/commands
+ source /var/lib/dokku/plugins/nginx-vhosts/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/ps/commands config:get dokku-test NO_VHOST
++ dirname /var/lib/dokku/plugins/ps/commands
+ source /var/lib/dokku/plugins/ps/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ dirname /var/lib/dokku/plugins/ps/commands
+ source /var/lib/dokku/plugins/ps/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+++ dirname /var/lib/dokku/plugins/ps/commands
++ source /var/lib/dokku/plugins/ps/../common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/psql-sc/commands config:get dokku-test NO_VHOST
++ dirname /var/lib/dokku/plugins/psql-sc/commands
+ source /var/lib/dokku/plugins/psql-sc/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ dirname /var/lib/dokku/plugins/psql-sc/commands
+ source /var/lib/dokku/plugins/psql-sc/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ [[ -f /home/dokku/ENV ]]
++ source /home/dokku/ENV
+++ export CURL_CONNECT_TIMEOUT=5
+++ CURL_CONNECT_TIMEOUT=5
+++ export CURL_TIMEOUT=30
+++ CURL_TIMEOUT=30
++ APP=dokku-test
++ PSQL_ROOT=/home/dokku/.psql-sc
++ PSQL_IMAGE=postgres:9.3
++ PSQL_CONTAINER_NAME=psql-single-container
++ PSQL_PORT=5432
++ PSQL_HOST=postgres
+ set +e
+ [[ config:get == psql:* ]]
+ case "$1" in
+ exit_code=0
+ set -e
+ [[ 0 -eq 10 ]]
+ implemented=1
+ [[ 0 -ne 0 ]]
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/redis/commands config:get dokku-test NO_VHOST
+ set +exo pipefail
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/shell/commands config:get dokku-test NO_VHOST
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ [[ 1 -eq 0 ]]
+ NO_VHOST=
+ RE_IPV4='([0-9]{1,3}[\.]){3}[0-9]{1,3}'
+ RE_IPV6='([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|'
+ RE_IPV6='([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|'
+ RE_IPV6='([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}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a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}([0-9]{1,3}[\.]){3}[0-9]{1,3}|([0-9a-fA-F]{1,4}:){1,4}:([0-9]{1,3}[\.]){3}[0-9]{1,3}$ ]]
+ [[ -z dokku.tsar.su ]]
+ [[ -f /home/dokku/dokku-test/VHOST ]]
+ echo false
+ BIND_EXTERNAL=false
+ [[ -n '' ]]
+ [[ -z '' ]]
++ dokku config:get dokku-test DOKKU_DOCKERFILE_PORT
+ [[ -f /home/dokku/dokkurc ]]
+ [[ -d /home/dokku/.dokkurc ]]
+ for f in '$DOKKU_ROOT/.dokkurc/*'
+ source /home/dokku/.dokkurc/DOKKU_TRACE
++ export DOKKU_TRACE=1
++ DOKKU_TRACE=1
+ [[ -n 1 ]]
+ set -x
+ parse_args config:get dokku-test DOKKU_DOCKERFILE_PORT
+ for arg in '"$@"'
+ case "$arg" in
+ for arg in '"$@"'
+ case "$arg" in
+ for arg in '"$@"'
+ case "$arg" in
+ return 0
+ args=("$@")
+ [[ config:get =~ ^--.* ]]
+ has_tty
++ /usr/bin/tty
++ true
+ [[ not a tty == \n\o\t\ \a\ \t\t\y ]]
+ return 1
+ DOKKU_QUIET_OUTPUT=1
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
+ [[ -n '' ]]
+ case "$1" in
+ implemented=0
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/00_dokku-standard/commands config:get dokku-test DOKKU_DOCKERFILE_PORT
++ dirname /var/lib/dokku/plugins/00_dokku-standard/commands
+ source /var/lib/dokku/plugins/00_dokku-standard/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/20_events/commands config:get dokku-test DOKKU_DOCKERFILE_PORT
++ dirname /var/lib/dokku/plugins/20_events/commands
+ source /var/lib/dokku/plugins/20_events/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ dirname /var/lib/dokku/plugins/20_events/commands
+ PLUGIN_DIR=/var/lib/dokku/plugins/20_events
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/apps/commands config:get dokku-test DOKKU_DOCKERFILE_PORT
++ dirname /var/lib/dokku/plugins/apps/commands
+ source /var/lib/dokku/plugins/apps/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/backup/commands config:get dokku-test DOKKU_DOCKERFILE_PORT
+ CURRENT_BACKUP_VERSION=1
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/config/commands config:get dokku-test DOKKU_DOCKERFILE_PORT
++ dirname /var/lib/dokku/plugins/config/commands
+ source /var/lib/dokku/plugins/config/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ ENV_FILE=/home/dokku/dokku-test/ENV
+ ENV_FILE_TEMP=/home/dokku/dokku-test/ENV.tmp
+ case "$1" in
+ [[ -z dokku-test ]]
+ verify_app_name dokku-test
+ local APP=dokku-test
+ [[ ! -n dokku-test ]]
+ [[ ! -d /home/dokku/dokku-test ]]
+ IMAGE=dokku/dokku-test
+ return 0
+ APP=dokku-test
+ [[ -z DOKKU_DOCKERFILE_PORT ]]
+ config_create
+ '[' -f /home/dokku/dokku-test/ENV ']'
+ [[ ! -s /home/dokku/dokku-test/ENV ]]
+ exit 0
+ exit_code=0
+ set -e
+ [[ 0 -eq 10 ]]
+ implemented=1
+ [[ 0 -ne 0 ]]
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/couchdb/commands config:get dokku-test DOKKU_DOCKERFILE_PORT
+ exit_code=0
+ set -e
+ [[ 0 -eq 10 ]]
+ implemented=1
+ [[ 0 -ne 0 ]]
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/docker-options/commands config:get dokku-test DOKKU_DOCKERFILE_PORT
++ dirname /var/lib/dokku/plugins/docker-options/commands
+ source /var/lib/dokku/plugins/docker-options/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ PHASES=(build deploy run)
+ FILE_PREFIX=DOCKER_OPTIONS_
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/domains/commands config:get dokku-test DOKKU_DOCKERFILE_PORT
++ dirname /var/lib/dokku/plugins/domains/commands
+ source /var/lib/dokku/plugins/domains/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ RE_IPV4='([0-9]{1,3}[\.]){3}[0-9]{1,3}'
+ RE_IPV6='([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|'
+ RE_IPV6='([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|'
+ RE_IPV6='([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|'
+ RE_IPV6='([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|'
+ RE_IPV6='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:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe08:(:[0-9a-fA-F]{1,4}){2,2}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}([0-9]{1,3}[\.]){3}[0-9]{1,3}|([0-9a-fA-F]{1,4}:){1,4}:([0-9]{1,3}[\.]){3}[0-9]{1,3}$'
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/elasticsearch/commands config:get dokku-test DOKKU_DOCKERFILE_PORT
+ [[ config:get == elasticsearch:* ]]
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/git/commands config:get dokku-test DOKKU_DOCKERFILE_PORT
++ dirname /var/lib/dokku/plugins/git/commands
+ source /var/lib/dokku/plugins/git/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/link/commands config:get dokku-test DOKKU_DOCKERFILE_PORT
+ [[ config:get == link ]]
+ [[ config:get == link:* ]]
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/nginx-vhosts/commands config:get dokku-test DOKKU_DOCKERFILE_PORT
++ dirname /var/lib/dokku/plugins/nginx-vhosts/commands
+ source /var/lib/dokku/plugins/nginx-vhosts/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/ps/commands config:get dokku-test DOKKU_DOCKERFILE_PORT
++ dirname /var/lib/dokku/plugins/ps/commands
+ source /var/lib/dokku/plugins/ps/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ dirname /var/lib/dokku/plugins/ps/commands
+ source /var/lib/dokku/plugins/ps/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+++ dirname /var/lib/dokku/plugins/ps/commands
++ source /var/lib/dokku/plugins/ps/../common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/psql-sc/commands config:get dokku-test DOKKU_DOCKERFILE_PORT
++ dirname /var/lib/dokku/plugins/psql-sc/commands
+ source /var/lib/dokku/plugins/psql-sc/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ dirname /var/lib/dokku/plugins/psql-sc/commands
+ source /var/lib/dokku/plugins/psql-sc/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ [[ -f /home/dokku/ENV ]]
++ source /home/dokku/ENV
+++ export CURL_CONNECT_TIMEOUT=5
+++ CURL_CONNECT_TIMEOUT=5
+++ export CURL_TIMEOUT=30
+++ CURL_TIMEOUT=30
++ APP=dokku-test
++ PSQL_ROOT=/home/dokku/.psql-sc
++ PSQL_IMAGE=postgres:9.3
++ PSQL_CONTAINER_NAME=psql-single-container
++ PSQL_PORT=5432
++ PSQL_HOST=postgres
+ set +e
+ [[ config:get == psql:* ]]
+ case "$1" in
+ exit_code=0
+ set -e
+ [[ 0 -eq 10 ]]
+ implemented=1
+ [[ 0 -ne 0 ]]
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/redis/commands config:get dokku-test DOKKU_DOCKERFILE_PORT
+ set +exo pipefail
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/shell/commands config:get dokku-test DOKKU_DOCKERFILE_PORT
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ [[ 1 -eq 0 ]]
+ DOKKU_DOCKERFILE_PORT=
+ [[ false = \f\a\l\s\e ]]
+ [[ web == \w\e\b ]]
+ port=5000
++ docker run -d -e PORT=5000 -e DYNO=web --env-file=/home/dokku/dokku-test/DOCKERFILE_ENV_FILE dokku/dokku-test
+ id=31cf0e66785387d8251967f82b44e46688b9932146d20c82564274b2f3ee2857
++ docker inspect --format '{{ .NetworkSettings.IPAddress }}' 31cf0e66785387d8251967f82b44e46688b9932146d20c82564274b2f3ee2857
+ ipaddr=172.17.1.111
+ trap kill_new INT TERM EXIT
+ dokku_log_info1 'Running pre-flight checks'
+ echo '-----> Running pre-flight checks'
-----> Running pre-flight checks
+ pluginhook check-deploy dokku-test 31cf0e66785387d8251967f82b44e46688b9932146d20c82564274b2f3ee2857 web 5000 172.17.1.111
++ dirname /var/lib/dokku/plugins/20_events/check-deploy
+ source /var/lib/dokku/plugins/20_events/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
++ dirname /var/lib/dokku/plugins/checks/check-deploy
+ source /var/lib/dokku/plugins/checks/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ APP=dokku-test
+ DOKKU_APP_CONTAINER_ID=31cf0e66785387d8251967f82b44e46688b9932146d20c82564274b2f3ee2857
+ DOKKU_APP_CONTAINER_TYPE=web
+ DOKKU_APP_LISTEN_PORT=5000
+ DOKKU_APP_LISTEN_IP=172.17.1.111
+ [[ -z 5000 ]]
+ [[ -z 172.17.1.111 ]]
+ [[ -z 31cf0e66785387d8251967f82b44e46688b9932146d20c82564274b2f3ee2857 ]]
+ [[ -f /home/dokku/ENV ]]
+ source /home/dokku/ENV
++ export CURL_CONNECT_TIMEOUT=5
++ CURL_CONNECT_TIMEOUT=5
++ export CURL_TIMEOUT=30
++ CURL_TIMEOUT=30
+ [[ -f /home/dokku/dokku-test/ENV ]]
+ source /home/dokku/dokku-test/ENV
+ WAIT=5
+ TIMEOUT=30
+ ATTEMPTS=5
++ mktemp -d /tmp/CHECKS.XXXXX
+ TMPDIR=/tmp/CHECKS.5rEVX
+ docker cp 31cf0e66785387d8251967f82b44e46688b9932146d20c82564274b2f3ee2857:/app/CHECKS /tmp/CHECKS.5rEVX
+ true
+ FILENAME=/tmp/CHECKS.5rEVX/CHECKS
+ trap cleanup EXIT
+ [[ ! -s /tmp/CHECKS.5rEVX/CHECKS ]]
+ dokku_log_verbose 'For more efficient zero downtime deployments, create a file CHECKS.'
+ echo '       For more efficient zero downtime deployments, create a file CHECKS.'
       For more efficient zero downtime deployments, create a file CHECKS.
+ dokku_log_verbose 'See http://progrium.viewdocs.io/dokku/checks-examples.md for examples'
+ echo '       See http://progrium.viewdocs.io/dokku/checks-examples.md for examples'
       See http://progrium.viewdocs.io/dokku/checks-examples.md for examples
+ dokku_log_verbose 'CHECKS file not found in container: Running simple container check...'
+ echo '       CHECKS file not found in container: Running simple container check...'
       CHECKS file not found in container: Running simple container check...
+ rm -rf /tmp/CHECKS.5rEVX
+ DOKKU_DEFAULT_WAIT=10
+ dokku_log_info1 'Waiting for 10 seconds ...'
+ echo '-----> Waiting for 10 seconds ...'
-----> Waiting for 10 seconds ...
+ sleep 10
+ docker ps -q --no-trunc
+ grep -q 31cf0e66785387d8251967f82b44e46688b9932146d20c82564274b2f3ee2857
+ dokku_log_info1 'Default container check successful!'
+ echo '-----> Default container check successful!'
-----> Default container check successful!
+ exit 0
+ cleanup
+ rm -rf /tmp/CHECKS.5rEVX
+ dokku_log_info2_quiet 'dokku-test container output:'
+ [[ -z '' ]]
+ echo '=====> dokku-test container output:'
=====> dokku-test container output:
+ dokku_container_log_verbose_quiet 31cf0e66785387d8251967f82b44e46688b9932146d20c82564274b2f3ee2857
+ CID=31cf0e66785387d8251967f82b44e46688b9932146d20c82564274b2f3ee2857
+ shift
+ OIFS='    
'
+ IFS='
'
++ docker logs 31cf0e66785387d8251967f82b44e46688b9932146d20c82564274b2f3ee2857
+ IFS='     
'
+ dokku_log_info2_quiet 'end dokku-test container output'
+ [[ -z '' ]]
+ echo '=====> end dokku-test container output'
=====> end dokku-test container output
+ trap - INT TERM EXIT
+ [[ -n 31cf0e66785387d8251967f82b44e46688b9932146d20c82564274b2f3ee2857 ]]
+ echo 31cf0e66785387d8251967f82b44e46688b9932146d20c82564274b2f3ee2857
+ [[ -n 172.17.1.111 ]]
+ echo 172.17.1.111
+ [[ -n 5000 ]]
+ echo 5000
+ [[ -n 5000 ]]
+ echo http://dokku.tsar.su:5000
+ rm -f /home/dokku/dokku-test/CONTAINER /home/dokku/dokku-test/IP /home/dokku/dokku-test/PORT
+ CONTAINER_INDEX=2
+ [[ 2 -le 1 ]]
+ [[ 1 == 0 ]]
+ CONTAINER_IDX_OFFSET=2
+ find /home/dokku/dokku-test -maxdepth 1 -name 'CONTAINER.web.*'
+ sort -t . -k 4 -n
+ tail -n +2
+ xargs rm -f
+ find /home/dokku/dokku-test -maxdepth 1 -name 'IP.web.*'
+ sort -t . -k 4 -n
+ tail -n +2
+ xargs rm -f
+ find /home/dokku/dokku-test -maxdepth 1 -name 'PORT.web.*'
+ sort -t . -k 4 -n
+ tail -n +2
+ xargs rm -f
+ read line
+ '[' -n '' ']'
+ dokku_log_info1 'Running post-deploy'
+ echo '-----> Running post-deploy'
-----> Running post-deploy
+ pluginhook post-deploy dokku-test 5000 172.17.1.111
++ dirname /var/lib/dokku/plugins/20_events/post-deploy
+ source /var/lib/dokku/plugins/20_events/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
++ dirname /var/lib/dokku/plugins/nginx-vhosts/post-deploy
+ source /var/lib/dokku/plugins/nginx-vhosts/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ APP=dokku-test
++ dokku config:get dokku-test NO_VHOST
+ [[ -f /home/dokku/dokkurc ]]
+ [[ -d /home/dokku/.dokkurc ]]
+ for f in '$DOKKU_ROOT/.dokkurc/*'
+ source /home/dokku/.dokkurc/DOKKU_TRACE
++ export DOKKU_TRACE=1
++ DOKKU_TRACE=1
+ [[ -n 1 ]]
+ set -x
+ parse_args config:get dokku-test NO_VHOST
+ for arg in '"$@"'
+ case "$arg" in
+ for arg in '"$@"'
+ case "$arg" in
+ for arg in '"$@"'
+ case "$arg" in
+ return 0
+ args=("$@")
+ [[ config:get =~ ^--.* ]]
+ has_tty
++ /usr/bin/tty
++ true
+ [[ not a tty == \n\o\t\ \a\ \t\t\y ]]
+ return 1
+ DOKKU_QUIET_OUTPUT=1
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
+ [[ -n '' ]]
+ case "$1" in
+ implemented=0
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/00_dokku-standard/commands config:get dokku-test NO_VHOST
++ dirname /var/lib/dokku/plugins/00_dokku-standard/commands
+ source /var/lib/dokku/plugins/00_dokku-standard/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/20_events/commands config:get dokku-test NO_VHOST
++ dirname /var/lib/dokku/plugins/20_events/commands
+ source /var/lib/dokku/plugins/20_events/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ dirname /var/lib/dokku/plugins/20_events/commands
+ PLUGIN_DIR=/var/lib/dokku/plugins/20_events
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/apps/commands config:get dokku-test NO_VHOST
++ dirname /var/lib/dokku/plugins/apps/commands
+ source /var/lib/dokku/plugins/apps/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/backup/commands config:get dokku-test NO_VHOST
+ CURRENT_BACKUP_VERSION=1
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/config/commands config:get dokku-test NO_VHOST
++ dirname /var/lib/dokku/plugins/config/commands
+ source /var/lib/dokku/plugins/config/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ ENV_FILE=/home/dokku/dokku-test/ENV
+ ENV_FILE_TEMP=/home/dokku/dokku-test/ENV.tmp
+ case "$1" in
+ [[ -z dokku-test ]]
+ verify_app_name dokku-test
+ local APP=dokku-test
+ [[ ! -n dokku-test ]]
+ [[ ! -d /home/dokku/dokku-test ]]
+ IMAGE=dokku/dokku-test
+ return 0
+ APP=dokku-test
+ [[ -z NO_VHOST ]]
+ config_create
+ '[' -f /home/dokku/dokku-test/ENV ']'
+ [[ ! -s /home/dokku/dokku-test/ENV ]]
+ exit 0
+ exit_code=0
+ set -e
+ [[ 0 -eq 10 ]]
+ implemented=1
+ [[ 0 -ne 0 ]]
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/couchdb/commands config:get dokku-test NO_VHOST
+ exit_code=0
+ set -e
+ [[ 0 -eq 10 ]]
+ implemented=1
+ [[ 0 -ne 0 ]]
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/docker-options/commands config:get dokku-test NO_VHOST
++ dirname /var/lib/dokku/plugins/docker-options/commands
+ source /var/lib/dokku/plugins/docker-options/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ PHASES=(build deploy run)
+ FILE_PREFIX=DOCKER_OPTIONS_
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/domains/commands config:get dokku-test NO_VHOST
++ dirname /var/lib/dokku/plugins/domains/commands
+ source /var/lib/dokku/plugins/domains/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ RE_IPV4='([0-9]{1,3}[\.]){3}[0-9]{1,3}'
+ RE_IPV6='([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|'
+ RE_IPV6='([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|'
+ RE_IPV6='([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|'
+ RE_IPV6='([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|'
+ RE_IPV6='([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4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-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe08:(:[0-9a-fA-F]{1,4}){2,2}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}([0-9]{1,3}[\.]){3}[0-9]{1,3}|([0-9a-fA-F]{1,4}:){1,4}:([0-9]{1,3}[\.]){3}[0-9]{1,3}$'
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/elasticsearch/commands config:get dokku-test NO_VHOST
+ [[ config:get == elasticsearch:* ]]
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/git/commands config:get dokku-test NO_VHOST
++ dirname /var/lib/dokku/plugins/git/commands
+ source /var/lib/dokku/plugins/git/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/link/commands config:get dokku-test NO_VHOST
+ [[ config:get == link ]]
+ [[ config:get == link:* ]]
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/nginx-vhosts/commands config:get dokku-test NO_VHOST
++ dirname /var/lib/dokku/plugins/nginx-vhosts/commands
+ source /var/lib/dokku/plugins/nginx-vhosts/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/ps/commands config:get dokku-test NO_VHOST
++ dirname /var/lib/dokku/plugins/ps/commands
+ source /var/lib/dokku/plugins/ps/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ dirname /var/lib/dokku/plugins/ps/commands
+ source /var/lib/dokku/plugins/ps/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+++ dirname /var/lib/dokku/plugins/ps/commands
++ source /var/lib/dokku/plugins/ps/../common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/psql-sc/commands config:get dokku-test NO_VHOST
++ dirname /var/lib/dokku/plugins/psql-sc/commands
+ source /var/lib/dokku/plugins/psql-sc/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ dirname /var/lib/dokku/plugins/psql-sc/commands
+ source /var/lib/dokku/plugins/psql-sc/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ [[ -f /home/dokku/ENV ]]
++ source /home/dokku/ENV
+++ export CURL_CONNECT_TIMEOUT=5
+++ CURL_CONNECT_TIMEOUT=5
+++ export CURL_TIMEOUT=30
+++ CURL_TIMEOUT=30
++ APP=dokku-test
++ PSQL_ROOT=/home/dokku/.psql-sc
++ PSQL_IMAGE=postgres:9.3
++ PSQL_CONTAINER_NAME=psql-single-container
++ PSQL_PORT=5432
++ PSQL_HOST=postgres
+ set +e
+ [[ config:get == psql:* ]]
+ case "$1" in
+ exit_code=0
+ set -e
+ [[ 0 -eq 10 ]]
+ implemented=1
+ [[ 0 -ne 0 ]]
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/redis/commands config:get dokku-test NO_VHOST
+ set +exo pipefail
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/shell/commands config:get dokku-test NO_VHOST
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ [[ 1 -eq 0 ]]
+ NO_VHOST=
+ [[ -n '' ]]
+ [[ ! -f /home/dokku/dokku-test/VHOST ]]
+ dokku nginx:build-config dokku-test
+ [[ -f /home/dokku/dokkurc ]]
+ [[ -d /home/dokku/.dokkurc ]]
+ for f in '$DOKKU_ROOT/.dokkurc/*'
+ source /home/dokku/.dokkurc/DOKKU_TRACE
++ export DOKKU_TRACE=1
++ DOKKU_TRACE=1
+ [[ -n 1 ]]
+ set -x
+ parse_args nginx:build-config dokku-test
+ for arg in '"$@"'
+ case "$arg" in
+ for arg in '"$@"'
+ case "$arg" in
+ return 0
+ args=("$@")
+ [[ nginx:build-config =~ ^--.* ]]
+ has_tty
++ /usr/bin/tty
++ true
+ [[ not a tty == \n\o\t\ \a\ \t\t\y ]]
+ return 1
+ DOKKU_QUIET_OUTPUT=1
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
+ [[ -n '' ]]
+ case "$1" in
+ implemented=0
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/00_dokku-standard/commands nginx:build-config dokku-test
++ dirname /var/lib/dokku/plugins/00_dokku-standard/commands
+ source /var/lib/dokku/plugins/00_dokku-standard/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/20_events/commands nginx:build-config dokku-test
++ dirname /var/lib/dokku/plugins/20_events/commands
+ source /var/lib/dokku/plugins/20_events/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ dirname /var/lib/dokku/plugins/20_events/commands
+ PLUGIN_DIR=/var/lib/dokku/plugins/20_events
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/apps/commands nginx:build-config dokku-test
++ dirname /var/lib/dokku/plugins/apps/commands
+ source /var/lib/dokku/plugins/apps/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/backup/commands nginx:build-config dokku-test
+ CURRENT_BACKUP_VERSION=1
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/config/commands nginx:build-config dokku-test
++ dirname /var/lib/dokku/plugins/config/commands
+ source /var/lib/dokku/plugins/config/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ ENV_FILE=/home/dokku/dokku-test/ENV
+ ENV_FILE_TEMP=/home/dokku/dokku-test/ENV.tmp
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/couchdb/commands nginx:build-config dokku-test
+ exit_code=0
+ set -e
+ [[ 0 -eq 10 ]]
+ implemented=1
+ [[ 0 -ne 0 ]]
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/docker-options/commands nginx:build-config dokku-test
++ dirname /var/lib/dokku/plugins/docker-options/commands
+ source /var/lib/dokku/plugins/docker-options/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ PHASES=(build deploy run)
+ FILE_PREFIX=DOCKER_OPTIONS_
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/domains/commands nginx:build-config dokku-test
++ dirname /var/lib/dokku/plugins/domains/commands
+ source /var/lib/dokku/plugins/domains/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ RE_IPV4='([0-9]{1,3}[\.]){3}[0-9]{1,3}'
+ RE_IPV6='([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|'
+ RE_IPV6='([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|'
+ RE_IPV6='([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|'
+ RE_IPV6='([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|'
+ RE_IPV6='([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|'
+ RE_IPV6='([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|'
+ R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A-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe08:(:[0-9a-fA-F]{1,4}){2,2}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}([0-9]{1,3}[\.]){3}[0-9]{1,3}|([0-9a-fA-F]{1,4}:){1,4}:([0-9]{1,3}[\.]){3}[0-9]{1,3}'
+ RE_IPV4='([0-9]{1,3}[\.]){3}[0-9]{1,3}$'
+ RE_IPV6='([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe08:(:[0-9a-fA-F]{1,4}){2,2}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}([0-9]{1,3}[\.]){3}[0-9]{1,3}|([0-9a-fA-F]{1,4}:){1,4}:([0-9]{1,3}[\.]){3}[0-9]{1,3}$'
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/elasticsearch/commands nginx:build-config dokku-test
+ [[ nginx:build-config == elasticsearch:* ]]
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/git/commands nginx:build-config dokku-test
++ dirname /var/lib/dokku/plugins/git/commands
+ source /var/lib/dokku/plugins/git/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/link/commands nginx:build-config dokku-test
+ [[ nginx:build-config == link ]]
+ [[ nginx:build-config == link:* ]]
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/nginx-vhosts/commands nginx:build-config dokku-test
++ dirname /var/lib/dokku/plugins/nginx-vhosts/commands
+ source /var/lib/dokku/plugins/nginx-vhosts/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ case "$1" in
+ APP=dokku-test
+ DOKKU_APP_LISTEN_PORT=
+ DOKKU_APP_LISTEN_IP=
+ verify_app_name dokku-test
+ local APP=dokku-test
+ [[ ! -n dokku-test ]]
+ [[ ! -d /home/dokku/dokku-test ]]
+ IMAGE=dokku/dokku-test
+ return 0
+ VHOST_PATH=/home/dokku/dokku-test/VHOST
+ URLS_PATH=/home/dokku/dokku-test/URLS
+ WILDCARD_SSL=/home/dokku/tls
+ SSL=/home/dokku/dokku-test/tls
+ APP_NGINX_TEMPLATE=/home/dokku/dokku-test/nginx.conf.template
+ [[ -z '' ]]
+ [[ -z '' ]]
+ shopt -s nullglob
+ for DOKKU_APP_IP_FILE in '$DOKKU_ROOT/$APP/IP.web.*'
++ echo /home/dokku/dokku-test/IP.web.1
++ sed -e s:IP:PORT:g
+ DOKKU_APP_PORT_FILE=/home/dokku/dokku-test/PORT.web.1
+ DOKKU_APP_LISTENER_IP=172.17.1.111
+ DOKKU_APP_LISTENER_PORT=5000
+ DOKKU_APP_LISTENERS+=' '
+ DOKKU_APP_LISTENERS+=172.17.1.111:5000
+ DOKKU_APP_LISTENERS+=' '
+ shopt -u nullglob
+ [[ -f /home/dokku/ENV ]]
+ source /home/dokku/ENV
++ export CURL_CONNECT_TIMEOUT=5
++ CURL_CONNECT_TIMEOUT=5
++ export CURL_TIMEOUT=30
++ CURL_TIMEOUT=30
+ [[ -f /home/dokku/dokku-test/ENV ]]
+ source /home/dokku/dokku-test/ENV
+ [[ -f /home/dokku/dokku-test/nginx.conf.template ]]
+ [[ ! -n '' ]]
+ [[ -f /home/dokku/dokku-test/VHOST ]]
++ cat /home/dokku/dokku-test/VHOST
+ NONSSL_VHOSTS=dokku-test.dokku.tsar.su
+ [[ -e /home/dokku/dokku-test/tls/server.crt ]]
+ [[ -e /home/dokku/tls/server.crt ]]
++ mktemp -t nginx.conf.XXXXXX
+ NGINX_CONF=/tmp/nginx.conf.1E6S2B
+ SCHEME=http
+ [[ -n '' ]]
+ [[ -n dokku-test.dokku.tsar.su ]]
++ echo dokku-test.dokku.tsar.su
++ tr '\n' ' '
+ NOSSL_SERVER_NAME='dokku-test.dokku.tsar.su '
+ xargs -i echo '-----> Configuring {}...'
-----> Configuring dokku-test.dokku.tsar.su...
+ [[ -z '' ]]
+ NGINX_TEMPLATE=/var/lib/dokku/plugins/nginx-vhosts/templates/nginx.conf.template
+ eval 'cat <<< "server {
  listen      [::]:80;
  listen      80;
  server_name $NOSSL_SERVER_NAME;
  access_log  /var/log/nginx/${APP}-access.log;
  error_log   /var/log/nginx/${APP}-error.log;

  location    / {
    proxy_pass  http://$APP;
    proxy_http_version 1.1;
    proxy_set_header Upgrade \$http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host \$http_host;
    proxy_set_header X-Forwarded-Proto \$scheme;
    proxy_set_header X-Forwarded-For \$remote_addr;
    proxy_set_header X-Forwarded-Port \$server_port;
    proxy_set_header X-Request-Start \$msec;
  }
  include $DOKKU_ROOT/$APP/nginx.conf.d/*.conf;
}" >> /tmp/nginx.conf.1E6S2B'
++ cat
+ [[ -n '' ]]
+ [[ -n  172.17.1.111:5000  ]]
+ echo 'upstream dokku-test { '
+ for listener in '$DOKKU_APP_LISTENERS'
+ echo '  server 172.17.1.111:5000;'
+ echo '}'
+ dokku_log_info1 'Creating http nginx.conf'
+ echo '-----> Creating http nginx.conf'
-----> Creating http nginx.conf
+ mv /tmp/nginx.conf.1E6S2B /home/dokku/dokku-test/nginx.conf
+ is_deployed dokku-test
+ APP=dokku-test
+ [[ -f /home/dokku/dokku-test/CONTAINER ]]
++ ls /home/dokku/dokku-test/CONTAINER.web.1
++ echo 0
+ [[ 0 -eq 0 ]]
+ return 0
+ dokku_log_info1 'Running nginx-pre-reload'
+ echo '-----> Running nginx-pre-reload'
-----> Running nginx-pre-reload
+ pluginhook nginx-pre-reload dokku-test
++ dirname /var/lib/dokku/plugins/20_events/nginx-pre-reload
+ source /var/lib/dokku/plugins/20_events/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ [[ ! -n '' ]]
+ dokku_log_verbose 'Reloading nginx'
+ echo '       Reloading nginx'
       Reloading nginx
+ validate_nginx
+ set +e
+ sudo /usr/sbin/nginx -t
+ exit_code=0
+ set -e
+ [[ 0 -ne 0 ]]
+ restart_nginx
+ case "$DOKKU_DISTRO" in
+ sudo /etc/init.d/nginx reload
+ echo '# THIS FILE IS GENERATED BY DOKKU - DO NOT EDIT, YOUR CHANGES WILL BE OVERWRITTEN'
+ xargs -i echo 'https://{}'
+ xargs -i echo 'http://{}'
+ exit_code=0
+ set -e
+ [[ 0 -eq 10 ]]
+ implemented=1
+ [[ 0 -ne 0 ]]
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/ps/commands nginx:build-config dokku-test
++ dirname /var/lib/dokku/plugins/ps/commands
+ source /var/lib/dokku/plugins/ps/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ dirname /var/lib/dokku/plugins/ps/commands
+ source /var/lib/dokku/plugins/ps/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+++ dirname /var/lib/dokku/plugins/ps/commands
++ source /var/lib/dokku/plugins/ps/../common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/psql-sc/commands nginx:build-config dokku-test
++ dirname /var/lib/dokku/plugins/psql-sc/commands
+ source /var/lib/dokku/plugins/psql-sc/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ dirname /var/lib/dokku/plugins/psql-sc/commands
+ source /var/lib/dokku/plugins/psql-sc/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ [[ -f /home/dokku/ENV ]]
++ source /home/dokku/ENV
+++ export CURL_CONNECT_TIMEOUT=5
+++ CURL_CONNECT_TIMEOUT=5
+++ export CURL_TIMEOUT=30
+++ CURL_TIMEOUT=30
++ APP=dokku-test
++ PSQL_ROOT=/home/dokku/.psql-sc
++ PSQL_IMAGE=postgres:9.3
++ PSQL_CONTAINER_NAME=psql-single-container
++ PSQL_PORT=5432
++ PSQL_HOST=postgres
+ set +e
+ [[ nginx:build-config == psql:* ]]
+ case "$1" in
+ exit_code=0
+ set -e
+ [[ 0 -eq 10 ]]
+ implemented=1
+ [[ 0 -ne 0 ]]
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/redis/commands nginx:build-config dokku-test
+ set +exo pipefail
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/shell/commands nginx:build-config dokku-test
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ [[ 1 -eq 0 ]]
+ [[ -n fd1ba4fe7a7689ed106eed2edd8d28177b2577a705ac3feb1625c6977dd5a7dc ]]
+ WAIT=60
+ dokku_log_info1 'Shutting down old containers in 60 seconds'
+ echo '-----> Shutting down old containers in 60 seconds'
-----> Shutting down old containers in 60 seconds
+ for oldid in '$oldids'
+ dokku_log_info2 fd1ba4fe7a7689ed106eed2edd8d28177b2577a705ac3feb1625c6977dd5a7dc
+ echo '=====> fd1ba4fe7a7689ed106eed2edd8d28177b2577a705ac3feb1625c6977dd5a7dc'
=====> fd1ba4fe7a7689ed106eed2edd8d28177b2577a705ac3feb1625c6977dd5a7dc
+ disown -a
+ sleep 0.1
+ exec
+ exit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment