Docker swarm config for distributed redis cache. It can be used as distributed replacement for common redis caching service.
Stack includes 3 services:
Main configuration options moved to x-common-variables block:
x-common-variables:
master-hostname: &master-hostname 'redis-node'
master-nodes: &master-nodes 3
redis-replicas: &redis-replicas 6
redis-port: &redis-port 6389
redis-mem: &redis-mem 2G
If you want, you can change the most right value. If you will change hostname, you need also change it in nodes service config (in one line).
wget https://raw.githubusercontent.com/WSandwitch/redis-swarm-cluster/master/docker-compose.yml
docker stack deploy -c docker-compose.yml redis
After that it takes several minutes for cluster to start and get ready, and then you can access it on 6379 port (by default).
Content type
Image
Digest
sha256:f1e73c56e…
Size
16.4 MB
Last updated
almost 2 years ago
docker pull wsandwitch/redis-cluster