mirror of
https://github.com/dokku/dokku.git
synced 2025-12-25 16:29:30 +01:00
If no Procfile is set, we'll leave the entrypoint alone, resulting in the default launcher for the web process (or whatever pack decided was default) executing. Closes #5753
30 lines
896 B
Bash
Executable File
30 lines
896 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail
|
|
[[ $DOKKU_TRACE ]] && set -x
|
|
|
|
trigger-builder-pack-docker-args-process-deploy() {
|
|
declare desc="builder-pack core-post-deploy plugin trigger"
|
|
declare trigger="docker-args-process-deploy"
|
|
declare APP="$1" IMAGE_SOURCE_TYPE="$2" IMAGE_TAG="$3" PROC_TYPE="$4"
|
|
local STDIN=$(cat)
|
|
local inject_launcher output
|
|
|
|
if [[ "$IMAGE_SOURCE_TYPE" != "pack" ]]; then
|
|
return
|
|
fi
|
|
|
|
inject_launcher=true
|
|
if [[ -n "$IMAGE_TAG" ]] && [[ -n "$PROC_TYPE" ]] && [[ -z "$(plugn trigger procfile-get-command "$APP" "$PROC_TYPE" "5000" 2>/dev/null || echo '')" ]]; then
|
|
inject_launcher=false
|
|
fi
|
|
|
|
if [[ "$inject_launcher" == "true" ]]; then
|
|
# without this, the command and arguments are passed as args to the default process type
|
|
output="--entrypoint launcher "
|
|
fi
|
|
|
|
echo -n "$STDIN$output"
|
|
}
|
|
|
|
trigger-builder-pack-docker-args-process-deploy "$@"
|