fix: actually persist redis data

Redis data was not actually persisted, because the redis configuration file was
not mounted from the right location. In order to mount redis data in a
host-mounted directory, the working directory has to be properly set.

The problem was occurring both with docker-compose and Kubernetes.

Close #404.
This commit is contained in:
Régis Behmo 2021-02-16 12:12:18 +01:00
parent e3a00c1bb6
commit 28afa890bf
3 changed files with 6 additions and 1 deletions

View File

@ -4,6 +4,8 @@ Note: Breaking changes between versions are indicated by "💥".
## Unreleased
- [Bugfix] Actually persist Redis data
## v11.2.0 (2021-02-10)
- [Bugfix] Upgrade all services to open-release/koa.2

View File

@ -425,6 +425,8 @@ spec:
containers:
- name: redis
image: {{ DOCKER_IMAGE_REDIS }}
args: ["redis-server", "/openedx/redis/config/redis.conf"]
workingDir: /openedx/redis/data
ports:
- containerPort: {{ REDIS_PORT }}
volumeMounts:

View File

@ -40,8 +40,9 @@ services:
{% if RUN_REDIS %}
redis:
image: {{ DOCKER_IMAGE_REDIS }}
working_dir: /openedx/redis/data
volumes:
- ../../env/redis/redis.conf:/openedx/redis/config/redis.conf:ro
- ../apps/redis/redis.conf:/openedx/redis/config/redis.conf:ro
- ../../data/redis:/openedx/redis/data
command: redis-server /openedx/redis/config/redis.conf
restart: unless-stopped