Loading redis.conf in RedisGraph Docker

Hi, I want to set up a RedisGraph cluster using Docker. As a starting point, I tried running a RedisGraph docker using a customized redis.conf file including the following parameters:
port 7005
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
loadmodule /usr/lib/redis/modules/redisgraph.so

Then finally I started the docker using the command:
docker run -d --name redis-test -p 7005:7005 -v '/data/redis-cluster-data/redis-test:/data/redis' -v '/data/redis-cluster-conf/redis6.conf:/usr/local/etc/redis/redis.conf' --restart=unless-stopped redislabs/redisgraph:2.2.1

But it seems the started Redis instance didn’t use the new redis.conf file, as when I check the logs, it started on the default port (6379) and there is no log about clustering information such a [82462] 26 Nov 11:56:55.329 * No cluster configuration found, I'm 97a3a64667477371c4479320d683e4c8db5858b1 as mentioned in the Redis document.
So I guess maybe in RedisGraph docker image, the path of the redis.conf file is different.

Update1: I also used the path /etc/redis.conf as redis.conf path when starting the container, but the same result!
Update2: Finally I set the configuration parameters in the docker run command and it started working as expected:
docker run -d --name redis-test -p 7005:7005 -v /data/redis/redis-test:/data/redis --restart=unless-stopped redislabs/redisgraph:2.2.1 --port 7005 --appendonly yes --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --loadmodule /usr/lib/redis/modules/redisgraph.so

Hello @ahoora08

The Docker image for RedisGraph is based on the official Redis image. To use it with a custom conf file you need to provide it with the path as an argument, so this should work:

docker run -d --name redis-test -p 7005:7005 -v '/data/redis-cluster-data/redis-test:/data/redis' -v '/data/redis-cluster-conf/redis6.conf:/usr/local/etc/redis/redis.conf' --restart=unless-stopped redislabs/redisgraph:2.2.1 /usr/local/etc/redis/redis.conf
2 Likes