eval the output of "dokku config --export" to get env config
This should theoretically be safe, as "--export" forces the `dokku config` command to return 0 in all cases, and it should only output lines that are "valid" environment variables
This commit is contained in:
@@ -338,7 +338,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|||||||
|
|
||||||
CONTAINERID="$1"; APP="$2"; PORT="$3" ; HOSTNAME="${4:-localhost}"
|
CONTAINERID="$1"; APP="$2"; PORT="$3" ; HOSTNAME="${4:-localhost}"
|
||||||
|
|
||||||
[[ -f "$DOKKU_ROOT/$APP/ENV" ]] && source $DOKKU_ROOT/$APP/ENV
|
eval $(dokku config $APP --export)
|
||||||
DOKKU_DISABLE_DEPLOY="${DOKKU_DISABLE_DEPLOY:-false}"
|
DOKKU_DISABLE_DEPLOY="${DOKKU_DISABLE_DEPLOY:-false}"
|
||||||
|
|
||||||
if [[ "$DOKKU_DISABLE_DEPLOY" = "true" ]]; then
|
if [[ "$DOKKU_DISABLE_DEPLOY" = "true" ]]; then
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ case "$1" in
|
|||||||
APP="$2"; IMAGE="dokku/$APP"; IMAGE_SOURCE_TYPE="$3"; TMP_WORK_DIR="$4"
|
APP="$2"; IMAGE="dokku/$APP"; IMAGE_SOURCE_TYPE="$3"; TMP_WORK_DIR="$4"
|
||||||
CACHE_DIR="$DOKKU_ROOT/$APP/cache"
|
CACHE_DIR="$DOKKU_ROOT/$APP/cache"
|
||||||
|
|
||||||
[[ -f "$DOKKU_ROOT/$APP/ENV" ]] && source "$DOKKU_ROOT/$APP/ENV"
|
eval $(dokku config $APP --export)
|
||||||
pushd "$TMP_WORK_DIR" &> /dev/null
|
pushd "$TMP_WORK_DIR" &> /dev/null
|
||||||
|
|
||||||
case "$IMAGE_SOURCE_TYPE" in
|
case "$IMAGE_SOURCE_TYPE" in
|
||||||
@@ -185,7 +185,7 @@ case "$1" in
|
|||||||
verify_app_name "$2"
|
verify_app_name "$2"
|
||||||
APP="$2";
|
APP="$2";
|
||||||
|
|
||||||
[[ -f "$DOKKU_ROOT/$APP/ENV" ]] && source "$DOKKU_ROOT/$APP/ENV"
|
eval $(dokku config $APP --export)
|
||||||
|
|
||||||
if [[ -s "$DOKKU_ROOT/$APP/URLS" ]]; then
|
if [[ -s "$DOKKU_ROOT/$APP/URLS" ]]; then
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
|||||||
@@ -51,8 +51,8 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# source global and in-app envs to get DOKKU_CHECKS_WAIT and any other necessary vars
|
# source global and in-app envs to get DOKKU_CHECKS_WAIT and any other necessary vars
|
||||||
[[ -f "$DOKKU_ROOT/ENV" ]] && source $DOKKU_ROOT/ENV
|
eval $(dokku config --global $APP --export)
|
||||||
[[ -f "$DOKKU_ROOT/$APP/ENV" ]] && source $DOKKU_ROOT/$APP/ENV
|
eval $(dokku config $APP --export)
|
||||||
|
|
||||||
# Wait this many seconds (default 5) for server to start before running checks.
|
# Wait this many seconds (default 5) for server to start before running checks.
|
||||||
WAIT="${DOKKU_CHECKS_WAIT:-5}"
|
WAIT="${DOKKU_CHECKS_WAIT:-5}"
|
||||||
|
|||||||
@@ -52,8 +52,8 @@ case "$1" in
|
|||||||
DOKKU_APP_CIDS=($(get_app_container_ids $APP))
|
DOKKU_APP_CIDS=($(get_app_container_ids $APP))
|
||||||
docker cp "${DOKKU_APP_CIDS[0]}:/app/nginx.conf.template" "$DOKKU_ROOT/$APP/" 2> /dev/null || true
|
docker cp "${DOKKU_APP_CIDS[0]}:/app/nginx.conf.template" "$DOKKU_ROOT/$APP/" 2> /dev/null || true
|
||||||
|
|
||||||
[[ -f "$DOKKU_ROOT/ENV" ]] && source $DOKKU_ROOT/ENV
|
eval $(dokku config --global $APP --export)
|
||||||
[[ -f "$DOKKU_ROOT/$APP/ENV" ]] && source $DOKKU_ROOT/$APP/ENV
|
eval $(dokku config $APP --export)
|
||||||
[[ -f "$APP_NGINX_TEMPLATE" ]] && NGINX_TEMPLATE="$APP_NGINX_TEMPLATE" && NGINX_CUSTOM_TEMPLATE="true" && dokku_log_info1 'Overriding default nginx.conf with detected nginx.conf.template'
|
[[ -f "$APP_NGINX_TEMPLATE" ]] && NGINX_TEMPLATE="$APP_NGINX_TEMPLATE" && NGINX_CUSTOM_TEMPLATE="true" && dokku_log_info1 'Overriding default nginx.conf with detected nginx.conf.template'
|
||||||
|
|
||||||
if [[ ! -n "$NO_VHOST" ]] && [[ -f "$DOKKU_ROOT/$APP/VHOST" ]]; then
|
if [[ ! -n "$NO_VHOST" ]] && [[ -f "$DOKKU_ROOT/$APP/VHOST" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user