From ff474b27dd838c300c01608e6cd10deb1c590a03 Mon Sep 17 00:00:00 2001 From: benoit charret Date: Sun, 7 Jun 2015 19:26:42 +0200 Subject: [PATCH] use public ip for the replica --- docker-data/start.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker-data/start.sh b/docker-data/start.sh index a45b08e..adf1776 100644 --- a/docker-data/start.sh +++ b/docker-data/start.sh @@ -1,4 +1,6 @@ supervisord sleep 3 -echo "yes" | ruby /redis/src/redis-trib.rb create --replicas 1 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005 + +IP=`ifconfig | grep "inet addr:17" | cut -f2 -d ":" | cut -f1 -d " "` +echo "yes" | ruby /redis/src/redis-trib.rb create --replicas 1 ${IP}:7000 ${IP}:7001 ${IP}:7002 ${IP}:7003 ${IP}:7004 ${IP}:7005 tail -f /var/log/supervisor/redis-1.log