Merge pull request #104 from plotly/support-local-config

Support locally-installed redis.conf
This commit is contained in:
Jose Diaz-Gonzalez
2018-04-10 15:54:42 -04:00
committed by GitHub

View File

@@ -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" || dokku_log_fail "Unable to copy the ${REDIS_CONFIG_PATH} to the config directory"
fi
PASSWORD=$(openssl rand -hex 32)
if [[ -n "$SERVICE_PASSWORD" ]]; then
PASSWORD="$SERVICE_PASSWORD"