Skip to content

Instantly share code, notes, and snippets.

@caiaffa
Created January 3, 2020 15:00
Show Gist options
  • Save caiaffa/c5abcf30e848226be10b398f5322bfc1 to your computer and use it in GitHub Desktop.
Save caiaffa/c5abcf30e848226be10b398f5322bfc1 to your computer and use it in GitHub Desktop.
Redis Cluster for Mac
version: '3'
services:
redis-1:
container_name: redis-1
image: redis:latest
ports:
- 7000:7000
- '7001:7001'
- '7002:7002'
- '7003:7003'
- '7004:7004'
- '7005:7005'
command: redis-server --port 7000 --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --appendonly yes
redis-2:
container_name: redis-2
image: redis:latest
command: redis-server --port 7001 --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --appendonly yes
network_mode: "service:redis-1"
redis-3:
container_name: redis-3
image: redis:latest
command: redis-server --port 7002 --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --appendonly yes
network_mode: "service:redis-1"
redis-4:
container_name: redis-4
image: redis:latest
command: redis-server --port 7003 --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --appendonly yes
network_mode: "service:redis-1"
redis-5:
container_name: redis-5
image: redis:latest
command: redis-server --port 7004 --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --appendonly yes
network_mode: "service:redis-1"
redis-6:
container_name: redis-6
image: redis:latest
command: redis-server --port 7005 --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --appendonly yes
network_mode: "service:redis-1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment