chore: Redis config don't write to filesystem at runtime (#26788)
Step towards not changing anything in the filesystem at runtime, except for things in `/tmp`.
This commit is contained in:
parent
f8752fd9ea
commit
fae3a4e7c7
|
|
@ -295,14 +295,7 @@ configure_supervisord() {
|
|||
fi
|
||||
if [[ $APPSMITH_REDIS_URL == *"localhost"* || $APPSMITH_REDIS_URL == *"127.0.0.1"* ]]; then
|
||||
cp "$SUPERVISORD_CONF_PATH/redis.conf" /etc/supervisor/conf.d/
|
||||
# Initialize Redis rdb directory
|
||||
local redis_db_path="$stacks_path/data/redis"
|
||||
mkdir -p "$redis_db_path"
|
||||
# Enable saving Redis session data to disk more often, so recent sessions aren't cleared on restart.
|
||||
sed -i \
|
||||
-e 's/^save 60 10000$/save 15 1/g' \
|
||||
-e "s|^dir /var/lib/redis$|dir ${redis_db_path}|g" \
|
||||
/etc/redis/redis.conf
|
||||
mkdir -p "$stacks_path/data/redis"
|
||||
fi
|
||||
if ! [[ -e "/appsmith-stacks/ssl/fullchain.pem" ]] || ! [[ -e "/appsmith-stacks/ssl/privkey.pem" ]]; then
|
||||
cp "$SUPERVISORD_CONF_PATH/cron.conf" /etc/supervisor/conf.d/
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
[program:redis]
|
||||
directory=/etc/redis
|
||||
; The empty string is used to force Redis to log to stdout
|
||||
; so that supervisor can capture it
|
||||
command=redis-server redis.conf --daemonize no --logfile ""
|
||||
; The `--save` is for saving session data to disk more often, so recent sessions aren't cleared on restart.
|
||||
; The empty string to `--logfile` is for logging to stdout so that supervisor can capture it.
|
||||
command=redis-server --save 15 1 --dir /appsmith-stacks/data/redis --daemonize no --logfile ""
|
||||
priority=5
|
||||
autostart=true
|
||||
autorestart=true
|
||||
|
|
@ -15,4 +15,4 @@ stderr_logfile_maxbytes=10MB
|
|||
stdout_logfile_backups=2
|
||||
stderr_logfile_backups=2
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user