mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
feat: expand the PORT environment variable when provided
Refs #2793 Refs #3196
This commit is contained in:
@@ -394,21 +394,13 @@ get_app_running_container_types() {
|
||||
|
||||
get_cmd_from_procfile() {
|
||||
declare desc="parse cmd from app Procfile"
|
||||
local APP=$1; local PROC_TYPE=$2; local DOKKU_PROCFILE="$DOKKU_ROOT/$APP/DOKKU_PROCFILE"
|
||||
declare APP="$1" PROC_TYPE="$2" PORT="$3"
|
||||
local DOKKU_PROCFILE="$DOKKU_ROOT/$APP/DOKKU_PROCFILE"
|
||||
local COMMAND
|
||||
verify_app_name "$APP"
|
||||
|
||||
if [[ -f $DOKKU_PROCFILE ]]; then
|
||||
local line; local name; local command
|
||||
while read -r line || [[ -n "$line" ]]; do
|
||||
if [[ -z "$line" ]] || [[ "$line" == "#"* ]]; then
|
||||
continue
|
||||
fi
|
||||
line=$(strip_inline_comments "$line")
|
||||
name="${line%%:*}"
|
||||
command="${line#*:[[:space:]]}"
|
||||
[[ "$name" == "$PROC_TYPE" ]] && echo "$command" && break
|
||||
done < "$DOKKU_PROCFILE"
|
||||
fi
|
||||
[[ ! -f $DOKKU_PROCFILE ]] && return
|
||||
procfile-util show -p "$PROC_TYPE" --port "$PORT"
|
||||
}
|
||||
|
||||
is_deployed() {
|
||||
|
||||
Reference in New Issue
Block a user