Grokzen / docker-redis-cluster

Dockerfile for Redis Cluster (redis 3.0+)
MIT License
1.45k stars 547 forks source link

modules #80

Open victorstewart opened 4 years ago

victorstewart commented 4 years ago

would be great to in some way streamline the ability to add modules. right now i'm just editing the dockerfile and boot script to build and load them.

any ideas?

Grokzen commented 4 years ago

I have never used a module inside redis so i have no idea in how to integrate or make them enabled or loaded upon a container build or start really.

Grokzen commented 4 years ago

One major problem tho is that i do not want to maintain a big repo of all possible redis modules in-sourced into this repo and available to be ued either through env variables or through some script. Yes documentation of how to do it can be added, but i dont know what else that can really be done more then that right now unless you have some great ideas of a sustainable solution to source things in?

victorstewart commented 4 years ago

i’m cool with just continuing to hack the files, just thought it might be a useful expansion.

it’s actually super straightforward. when booting redis-server all you do is pass in...

--loadmodule /path/to/mymodule.so

sorry on mobile otherwise i’d format lol.

so the simplest way to get it done would be to pass in a list of the precompiled modules, copy them into the image and then link.

could also pass in repository links, and assume a standard ./configure && make complication pattern. but that gets a bit beyond straightforward.

Grokzen commented 4 years ago

Currently i have no plans to add any support for modules to this container myself. Anyone that want to propose a simple and straightforward solution to this is more then welcome to provide a patch that would add support for this. The only solution that i would consider be acceptible is to have a volume mapped from your host into the container that contains the compiled modules files and then provide a option or argument or something to pass into the container when it starts that would append and load the modules into all the redis nodes.