mirror of
https://github.com/dokku/dokku.git
synced 2025-12-25 16:29:30 +01:00
44 lines
681 B
Bash
Executable File
44 lines
681 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|
|
|
STDIN=$(cat)
|
|
APP="$1"
|
|
|
|
case "$0" in
|
|
*docker-args-build)
|
|
PHASE=BUILD
|
|
;;
|
|
*docker-args-deploy)
|
|
PHASE=DEPLOY
|
|
;;
|
|
*docker-args-run)
|
|
PHASE=RUN
|
|
;;
|
|
esac
|
|
|
|
FILE_PREFIX="DOCKER_OPTIONS_"
|
|
PHASE_FILE_PATH="${DOKKU_ROOT}/${APP}/${FILE_PREFIX}${PHASE}"
|
|
|
|
output=""
|
|
|
|
if [[ -f "$PHASE_FILE_PATH" ]]; then
|
|
DONE=false
|
|
until $DONE; do
|
|
read line || DONE=true
|
|
|
|
[[ ! -n "$line" ]] && continue
|
|
|
|
# shellcheck disable=SC1001
|
|
case "$line" in
|
|
\#*)
|
|
continue
|
|
;;
|
|
*)
|
|
output="$output $line"
|
|
;;
|
|
esac
|
|
done < $PHASE_FILE_PATH
|
|
fi
|
|
|
|
echo "$STDIN$output"
|