19 lines
617 B
Bash
Executable File
19 lines
617 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|
source "$PLUGIN_PATH/common/functions"
|
|
source "$PLUGIN_PATH/config/functions"
|
|
|
|
STDIN=$(cat); APP="$1"; TAG="$2"
|
|
DOCKERFILE_ENV_FILE="$DOKKU_ROOT/$APP/DOCKERFILE_ENV_FILE"
|
|
verify_app_name "$APP" "$TAG"
|
|
|
|
if ! is_image_herokuish_based "$IMAGE"; then
|
|
> "$DOCKERFILE_ENV_FILE"
|
|
config_export global | sed -e "s:^export ::g" -e "s:=':=:g" -e "s:'$::g" > "$DOCKERFILE_ENV_FILE"
|
|
config_export app $APP | sed -e "s:^export ::g" -e "s:=':=:g" -e "s:'$::g" >> "$DOCKERFILE_ENV_FILE"
|
|
|
|
echo "$STDIN --env-file=$DOCKERFILE_ENV_FILE"
|
|
else
|
|
echo "$STDIN"
|
|
fi
|