refactor to explicitly set IMAGE via get_app_image_name()

This commit is contained in:
Michael Hobbs
2015-09-03 16:07:23 -07:00
parent 2f16b06a76
commit 495b1d2ba0
14 changed files with 122 additions and 107 deletions

View File

@@ -11,8 +11,9 @@ print_dokku_scale_file(){
}
generate_scale_file() {
local APP="$1"; local TAG="$3"; local DOKKU_SCALE_FILE="$DOKKU_ROOT/$APP/DOKKU_SCALE"
verify_app_name "$APP" "$TAG"
local APP="$1"; local IMAGE_TAG="$3"; local IMAGE=$(get_app_image_name $APP $IMAGE_TAG); local DOKKU_SCALE_FILE="$DOKKU_ROOT/$APP/DOKKU_SCALE"
verify_app_name "$APP"
copy_from_image "$IMAGE" "/app/DOKKU_SCALE" "$DOKKU_ROOT/$APP" 2>/dev/null || true
if [[ ! -f $DOKKU_SCALE_FILE ]]; then
dokku_log_info1_quiet "DOKKU_SCALE file not found in app image. Defaulting to a single web process"