sentinel-entrypoint.sh 652 Bytes
Newer Older
Sandro Lutz's avatar
Sandro Lutz committed
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

sed -i 's,{{REDIS_MASTER}},'"${REDIS_MASTER}"',g' /etc/redis/sentinel.conf
sed -i 's,{{SENTINEL_QUORUM}},'"${SENTINEL_QUORUM}"',g' /etc/redis/sentinel.conf
sed -i 's,{{SENTINEL_DOWN_AFTER}},'"${SENTINEL_DOWN_AFTER}"',g' /etc/redis/sentinel.conf
sed -i 's,{{SENTINEL_FAILOVER}},'"${SENTINEL_FAILOVER}"',g' /etc/redis/sentinel.conf

sed -i "s/\{{SENTINEL_QUORUM}}/$SENTINEL_QUORUM/g" /etc/redis/sentinel.conf
sed -i "s/\$SENTINEL_DOWN_AFTER/$SENTINEL_DOWN_AFTER/g" /etc/redis/sentinel.conf
sed -i "s/\$SENTINEL_FAILOVER/$SENTINEL_FAILOVER/g" /etc/redis/sentinel.conf

exec docker-entrypoint.sh redis-server /etc/redis/sentinel.conf --sentinel