1
0
Fork 0
mirror of https://github.com/overleaf/toolkit.git synced 2025-04-19 15:28:06 +02:00

Added REDIS_AOF_PERSISTENCE option to config/overleaf.rc

This commit is contained in:
mserranom 2024-06-18 10:39:01 +02:00
parent 9a7a0e8f21
commit 2c402d8bc0
5 changed files with 22 additions and 0 deletions

View file

@ -1,5 +1,11 @@
# Changelog
## 2024-07-27
### Added
- Added "--appendonly yes" configuration to redis.
redis persistence documentation: https://redis.io/docs/latest/operate/oss_and_stack/management/persistence/
## 2024-07-16
### Added
- Added support for Mongo 6.0.

View file

@ -109,6 +109,17 @@ function set_redis_vars() {
DOCKER_COMPOSE_FLAGS+=(-f "$TOOLKIT_ROOT/lib/docker-compose.redis.yml")
export REDIS_IMAGE
export REDIS_DATA_PATH
if [[ -z "${REDIS_AOF_PERSISTENCE:-}" ]]; then
echo "WARNING: the value of REDIS_AOF_PERSISTENCE is not set in config/overleaf.rc"
echo "See https://github.com/overleaf/overleaf/wiki/Release-Notes-5.x.x#server-pro-510"
REDIS_COMMAND="redis-server"
elif [[ $REDIS_AOF_PERSISTENCE == "true" ]]; then
REDIS_COMMAND="redis-server --appendonly yes"
else
REDIS_COMMAND="redis-server"
fi
export REDIS_COMMAND
}
# Set environment variables for docker-compose.mongo.yml

View file

@ -256,6 +256,9 @@ function check_config_files() {
if [[ "${REDIS_IMAGE:-null}" != "null" ]]; then
print_point 2 "REDIS_IMAGE: $REDIS_IMAGE"
fi
if [[ "${REDIS_AOF_PERSISTENCE:-null}" != "null" ]]; then
print_point 2 "REDIS_AOF_PERSISTENCE: $REDIS_AOF_PERSISTENCE"
fi
if [[ "${REDIS_DATA_PATH:-null}" != "null" ]]; then
print_point 2 "REDIS_DATA_PATH: $REDIS_DATA_PATH"
fi

View file

@ -23,6 +23,7 @@ MONGO_IMAGE=mongo:5.0
REDIS_ENABLED=true
REDIS_DATA_PATH=data/redis
REDIS_IMAGE=redis:6.2
REDIS_AOF_PERSISTENCE=true
# Git-bridge configuration (Server Pro only)
GIT_BRIDGE_ENABLED=false

View file

@ -8,6 +8,7 @@ services:
volumes:
- "${REDIS_DATA_PATH}:/data"
container_name: redis
command: ${REDIS_COMMAND}
expose:
- 6379