feat: add ability to specify custom flags on clone/create

Refs dokku/dokku-redis#64
This commit is contained in:
Jose Diaz-Gonzalez
2017-08-26 18:10:31 -04:00
parent 464354506b
commit afcfc0253c
4 changed files with 70 additions and 6 deletions

View File

@@ -17,7 +17,7 @@ mysql-clone-cmd() {
PLUGIN_IMAGE=$(service_version "$SERVICE" | grep -o "^.*:" | sed -r "s/://g")
PLUGIN_IMAGE_VERSION=$(service_version "$SERVICE" | grep -o ":.*$" | sed -r "s/://g")
service_create "$NEW_SERVICE"
service_create "$NEW_SERVICE" "${@:3}"
dokku_log_info1 "Copying data from $SERVICE to $NEW_SERVICE"
service_export "$SERVICE" | service_import "$NEW_SERVICE" > /dev/null 2>&1 || true
dokku_log_info1 "Done"

View File

@@ -9,7 +9,7 @@ mysql-create-cmd() {
local cmd="$PLUGIN_COMMAND_PREFIX:create" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1
declare SERVICE="$1"
service_create "$SERVICE"
service_create "$SERVICE" "${@:2}"
}
mysql-create-cmd "$@"