As briefly discussed in #1425, source the `common/functions` file via an absolute path, rather than determining the relative path by using `dirname`. 3rd-party plugins should follow suit and use the new `$PLUGIN_PATH` convention too.
17 lines
456 B
Bash
Executable File
17 lines
456 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|
source "$PLUGIN_PATH/common/functions"
|
|
|
|
APP="$1"
|
|
if [[ -f "$DOKKU_ROOT/$APP/IP.web.1" ]] && [[ -f "$DOKKU_ROOT/$APP/PORT.web.1" ]]; then
|
|
NO_VHOST=$(dokku config:get $APP NO_VHOST || true)
|
|
|
|
if [[ -n "$NO_VHOST" ]]; then
|
|
dokku_log_info1 "NO_VHOST config detected"
|
|
elif [[ ! -f "$DOKKU_ROOT/$APP/VHOST" ]]; then
|
|
dokku domains:setup $APP
|
|
fi
|
|
|
|
dokku nginx:build-config $APP
|
|
fi
|