Use config_export function instead of calling dokku as a subcommand

This commit is contained in:
Jose Diaz-Gonzalez
2015-08-30 01:55:14 -04:00
parent cddc4afcea
commit e7c035e207
8 changed files with 40 additions and 21 deletions

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_PATH/common/functions"
source "$PLUGIN_PATH/config/functions"
validate_nginx () {
set +e
@@ -52,8 +53,8 @@ case "$1" in
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
eval "$(dokku config --global $APP --export)"
eval "$(dokku config $APP --export)"
eval "$(config_export global)"
eval "$(config_export app $APP)"
[[ -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