Merge pull request #14957 from Budibase/redis-persistence-opt-in
Add USE_DEFAULT_REDIS_CONFIG environment variable to single image to disable our config customisations.
This commit is contained in:
commit
fd1a18a1e9
|
@ -81,11 +81,17 @@ mkdir -p ${DATA_DIR}/minio
|
||||||
mkdir -p ${DATA_DIR}/redis
|
mkdir -p ${DATA_DIR}/redis
|
||||||
chown -R couchdb:couchdb ${DATA_DIR}/couch
|
chown -R couchdb:couchdb ${DATA_DIR}/couch
|
||||||
|
|
||||||
sed -i "s#DATA_DIR#${DATA_DIR}#g" /etc/redis/redis.conf
|
REDIS_CONFIG="/etc/redis/redis.conf"
|
||||||
|
sed -i "s#DATA_DIR#${DATA_DIR}#g" "${REDIS_CONFIG}"
|
||||||
|
|
||||||
|
if [[ -n "${USE_DEFAULT_REDIS_CONFIG}" ]]; then
|
||||||
|
REDIS_CONFIG=""
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -n "${REDIS_PASSWORD}" ]]; then
|
if [[ -n "${REDIS_PASSWORD}" ]]; then
|
||||||
redis-server /etc/redis/redis.conf --requirepass $REDIS_PASSWORD > /dev/stdout 2>&1 &
|
redis-server "${REDIS_CONFIG}" --requirepass $REDIS_PASSWORD > /dev/stdout 2>&1 &
|
||||||
else
|
else
|
||||||
redis-server /etc/redis/redis.conf > /dev/stdout 2>&1 &
|
redis-server "${REDIS_CONFIG}" > /dev/stdout 2>&1 &
|
||||||
fi
|
fi
|
||||||
/bbcouch-runner.sh &
|
/bbcouch-runner.sh &
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue