Merge pull request #1428 from jimeh/use-plugin-path-env-var
Use `$PLUGIN_PATH` instead of `$(dirname $0)/..`
This commit is contained in:
@@ -15,7 +15,7 @@ The below plugin is a dummy `dokku hello` plugin. If your plugin exposes command
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
case "$1" in
|
||||
hello)
|
||||
|
||||
@@ -253,7 +253,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
dokku_log_info1" Installing GraphicsMagick..."
|
||||
|
||||
@@ -279,7 +279,7 @@ docker commit $ID $IMAGE > /dev/null
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
dokku_log_info1" Installing $CONTAINER_PACKAGE..."
|
||||
|
||||
@@ -360,7 +360,7 @@ fi
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
APP="$1"
|
||||
IMAGE="dokku/$APP"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
case "$1" in
|
||||
build)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
PLUGIN_DIR="$(dirname $0)"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
[[ ! "$DOKKU_EVENTS" ]] || dokku_log_pluginhook_call "$(basename $0)" "$@"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
DOKKU_RSYSLOG_FILTER=/etc/rsyslog.d/99-dokku.conf
|
||||
DOKKU_LOGROTATE_FILE=/etc/logrotate.d/dokku
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
case "$1" in
|
||||
apps)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
APP="$1"; IMAGE="dokku/$APP"; BUILD_ENV=""
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
APP="$1"; DOKKU_APP_CONTAINER_ID="$2"; DOKKU_APP_CONTAINER_TYPE="$3"; DOKKU_APP_LISTEN_PORT="$4"; DOKKU_APP_LISTEN_IP="$5"
|
||||
if [[ -z "$DOKKU_APP_LISTEN_PORT" ]] && [[ -f "$DOKKU_ROOT/$APP/PORT" ]]; then
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
config_create () {
|
||||
[ -f $ENV_FILE ] || {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
STDIN=$(cat); APP="$1"; IMAGE="dokku/$APP"
|
||||
DOCKERFILE_ENV_FILE="$DOKKU_ROOT/$APP/DOCKERFILE_ENV_FILE"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
PHASES=(build deploy run)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
RE_IPV4="([0-9]{1,3}[\.]){3}[0-9]{1,3}"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
git_build_app_repo() {
|
||||
verify_app_name "$1"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
APP="$1"; REV="$2"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
validate_nginx () {
|
||||
set +e
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
APP="$1"
|
||||
if [[ -f "$DOKKU_ROOT/$APP/IP.web.1" ]] && [[ -f "$DOKKU_ROOT/$APP/PORT.web.1" ]]; then
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
APP="$1"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
source "$(dirname $0)/functions"
|
||||
|
||||
case "$1" in
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
|
||||
release_and_deploy() {
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
local APP="$1"; local IMAGE="dokku/$APP"
|
||||
|
||||
if verify_image "$IMAGE"; then
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
source "$(dirname $0)/functions"
|
||||
|
||||
APP="$1"
|
||||
|
||||
Reference in New Issue
Block a user