Skip to content

Commit ff474b2

Browse files
committed
use public ip for the replica
1 parent db4804d commit ff474b2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docker-data/start.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
supervisord
22
sleep 3
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
3+
4+
IP=`ifconfig | grep "inet addr:17" | cut -f2 -d ":" | cut -f1 -d " "`
5+
echo "yes" | ruby /redis/src/redis-trib.rb create --replicas 1 ${IP}:7000 ${IP}:7001 ${IP}:7002 ${IP}:7003 ${IP}:7004 ${IP}:7005
46
tail -f /var/log/supervisor/redis-1.log

0 commit comments

Comments
 (0)