From 8cc870a1bba56a2f29e3db339b0abf615e3d773a Mon Sep 17 00:00:00 2001 From: Jody McIntyre Date: Wed, 4 Apr 2018 15:42:22 -0400 Subject: [PATCH] Support locally-installed redis.conf --- functions | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/functions b/functions index b991268..e69d55a 100755 --- a/functions +++ b/functions @@ -36,7 +36,11 @@ service_create() { mkdir -p "$SERVICE_ROOT" || dokku_log_fail "Unable to create service directory" mkdir -p "$SERVICE_ROOT/data" || dokku_log_fail "Unable to create service data directory" mkdir -p "$SERVICE_ROOT/config" || dokku_log_fail "Unable to create service config directory" - curl -sSL "https://raw.githubusercontent.com/antirez/redis/${PLUGIN_IMAGE_VERSION:0:3}/redis.conf" > "$SERVICE_ROOT/config/redis.conf" || dokku_log_fail "Unable to download the default redis.conf to the config directory" + if [[ -z $REDIS_CONFIG_PATH ]] ; then + curl -sSL "https://raw.githubusercontent.com/antirez/redis/${PLUGIN_IMAGE_VERSION:0:3}/redis.conf" > "$SERVICE_ROOT/config/redis.conf" || dokku_log_fail "Unable to download the default redis.conf to the config directory" + else + cp "$REDIS_CONFIG_PATH" "$SERVICE_ROOT/config/redis.conf" + fi PASSWORD=$(openssl rand -hex 32) if [[ -n "$SERVICE_PASSWORD" ]]; then PASSWORD="$SERVICE_PASSWORD"