redis-stack / redis-stack-docs

6 stars 55 forks source link

Run Redis Stack on Docker #155

Open gowizzard opened 1 year ago

gowizzard commented 1 year ago

Hi all, I've been sitting on the issue with the bind mount of the dump.rdb file for quite a long time now. I always wondered that after a restart the database was empty, although I set the path as specified in the doc.

I took a look at the container content once and found out that the path was set to /, so the dump.rdb was not in the /data/redis directory, but directly in / and the container then reloaded it every time I started my Docker Compose.

I then solved the whole thing via a redis.conf file, which I set via a bind mount and call via CMD in Docker Compose. The section looks like this:

...
dir /data/redis
...

In general, this information would have been cool, since you specify the whole thing in your example:

docker run -v /local-data/:/data redis/redis-stack:latest

This also works beautifully with the redis:latest (c9bee82a203a) Docker container and you don't need any additional configuration. With the current redis/redis-stack-server:latest (580cd2320a9b) version but as said not. Does anyone else have the same problems?

Thanks a lot Jonas