mirror of
https://github.com/dokku/dokku.git
synced 2025-12-16 12:07:45 +01:00
The DOKKU_APP_TYPE has long since ceased to be the correct way to specify the builder for the application. It's only usage has been during the detection phase, specifically to ensure that the herokuish plugin injects the correct docker arguments during the build. As such, it is safe to migrate away to a property in a patch release. Users that seek to set a specific builder should use 'dokku builder:set $APP selected' instead. Refs #7863
27 lines
757 B
Bash
Executable File
27 lines
757 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail
|
|
[[ $DOKKU_TRACE ]] && set -x
|
|
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
|
|
|
trigger-builder-herokuish-docker-args() {
|
|
declare desc="builder-herokuish docker-args plugin trigger"
|
|
declare trigger="docker-args"
|
|
declare APP="$1"
|
|
local STDIN DOKKU_APP_TYPE DOKKU_APP_USER
|
|
|
|
STDIN=$(cat)
|
|
DOKKU_APP_TYPE="$(plugn trigger builder-get-property "$APP" "detected" || true)"
|
|
DOKKU_APP_USER="$(config_get "$APP" DOKKU_APP_USER || true)"
|
|
DOKKU_APP_USER="${DOKKU_APP_USER:="herokuishuser"}"
|
|
|
|
if [[ "$DOKKU_APP_TYPE" == "herokuish" ]]; then
|
|
local docker_args="$STDIN --env=USER=${DOKKU_APP_USER}"
|
|
else
|
|
local docker_args="$STDIN"
|
|
fi
|
|
|
|
echo -n "$docker_args"
|
|
}
|
|
|
|
trigger-builder-herokuish-docker-args "$@"
|