Skip to content

Commit bafb95c

Browse files
authored
Merge branch 'master' into patch-1
2 parents d0d8eb5 + 3a0c724 commit bafb95c

26 files changed

+1507
-141
lines changed

docker-compose.yml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,23 @@ version: "3.8"
55
services:
66

77
redis:
8-
image: redis/redis-stack-server:edge
8+
image: ${REDIS_IMAGE:-redis:latest}
99
container_name: redis-standalone
10+
command: redis-server --enable-debug-command yes
1011
ports:
1112
- 6379:6379
12-
environment:
13-
- "REDIS_ARGS=--enable-debug-command yes --enable-module-command yes"
1413
profiles:
1514
- standalone
1615
- sentinel
1716
- replica
1817
- all
1918

2019
replica:
21-
image: redis/redis-stack-server:edge
20+
image: ${REDIS_IMAGE:-redis:latest}
2221
container_name: redis-replica
2322
depends_on:
2423
- redis
25-
environment:
26-
- "REDIS_ARGS=--replicaof redis 6379"
24+
command: redis-server --replicaof redis 6379
2725
ports:
2826
- 6380:6379
2927
profiles:
@@ -35,6 +33,8 @@ services:
3533
build:
3634
context: .
3735
dockerfile: dockers/Dockerfile.cluster
36+
args:
37+
REDIS_IMAGE: ${REDIS_IMAGE:-redis:latest}
3838
ports:
3939
- 16379:16379
4040
- 16380:16380
@@ -63,13 +63,11 @@ services:
6363
- "./dockers/stunnel/keys:/etc/stunnel/keys:ro"
6464

6565
sentinel:
66-
image: redis/redis-stack-server:edge
66+
image: ${REDIS_IMAGE:-redis:latest}
6767
container_name: redis-sentinel
6868
depends_on:
6969
- redis
70-
environment:
71-
- "REDIS_ARGS=--port 26379"
72-
entrypoint: "/opt/redis-stack/bin/redis-sentinel /redis.conf --port 26379"
70+
entrypoint: "/usr/local/bin/redis-sentinel /redis.conf --port 26379"
7371
ports:
7472
- 26379:26379
7573
volumes:
@@ -79,13 +77,11 @@ services:
7977
- all
8078

8179
sentinel2:
82-
image: redis/redis-stack-server:edge
80+
image: ${REDIS_IMAGE:-redis:latest}
8381
container_name: redis-sentinel2
8482
depends_on:
8583
- redis
86-
environment:
87-
- "REDIS_ARGS=--port 26380"
88-
entrypoint: "/opt/redis-stack/bin/redis-sentinel /redis.conf --port 26380"
84+
entrypoint: "/usr/local/bin/redis-sentinel /redis.conf --port 26380"
8985
ports:
9086
- 26380:26380
9187
volumes:
@@ -95,15 +91,26 @@ services:
9591
- all
9692

9793
sentinel3:
98-
image: redis/redis-stack-server:edge
94+
image: ${REDIS_IMAGE:-redis:latest}
9995
container_name: redis-sentinel3
10096
depends_on:
10197
- redis
102-
entrypoint: "/opt/redis-stack/bin/redis-sentinel /redis.conf --port 26381"
98+
entrypoint: "/usr/local/bin/redis-sentinel /redis.conf --port 26381"
10399
ports:
104100
- 26381:26381
105101
volumes:
106102
- "./dockers/sentinel.conf:/redis.conf"
107103
profiles:
108104
- sentinel
109105
- all
106+
107+
redis-stack:
108+
image: redis/redis-stack-server:edge
109+
container_name: redis-stack
110+
ports:
111+
- 6479:6379
112+
environment:
113+
- "REDIS_ARGS=--enable-debug-command yes --enable-module-command yes"
114+
profiles:
115+
- standalone
116+
- all

dockers/Dockerfile.cluster

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM redis/redis-stack-server:edge as rss
1+
ARG REDIS_IMAGE=redis:latest
2+
FROM $REDIS_IMAGE
23

34
COPY dockers/create_cluster.sh /create_cluster.sh
4-
RUN ls -R /opt/redis-stack
55
RUN chmod a+x /create_cluster.sh
66

77
ENTRYPOINT [ "/create_cluster.sh"]

dockers/cluster.redis.conf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
11
protected-mode no
22
enable-debug-command yes
3-
loadmodule /opt/redis-stack/lib/redisearch.so
4-
loadmodule /opt/redis-stack/lib/redisgraph.so
5-
loadmodule /opt/redis-stack/lib/redistimeseries.so
6-
loadmodule /opt/redis-stack/lib/rejson.so
7-
loadmodule /opt/redis-stack/lib/redisbloom.so
8-
loadmodule /opt/redis-stack/lib/redisgears.so v8-plugin-path /opt/redis-stack/lib/libredisgears_v8_plugin.so

dockers/create_cluster.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dir /nodes/$PORT
3131
EOF
3232

3333
set -x
34-
/opt/redis-stack/bin/redis-server /nodes/$PORT/redis.conf
34+
/usr/local/bin/redis-server /nodes/$PORT/redis.conf
3535
sleep 1
3636
if [ $? -ne 0 ]; then
3737
echo "Redis failed to start, exiting."
@@ -40,8 +40,8 @@ EOF
4040
echo 127.0.0.1:$PORT >> /nodes/nodemap
4141
done
4242
if [ -z "${REDIS_PASSWORD}" ]; then
43-
echo yes | /opt/redis-stack/bin/redis-cli --cluster create `seq -f 127.0.0.1:%g ${START_PORT} ${END_PORT}` --cluster-replicas 1
43+
echo yes | /usr/local/bin/redis-cli --cluster create `seq -f 127.0.0.1:%g ${START_PORT} ${END_PORT}` --cluster-replicas 1
4444
else
45-
echo yes | opt/redis-stack/bin/redis-cli -a ${REDIS_PASSWORD} --cluster create `seq -f 127.0.0.1:%g ${START_PORT} ${END_PORT}` --cluster-replicas 1
45+
echo yes | /usr/local/bin/redis-cli -a ${REDIS_PASSWORD} --cluster create `seq -f 127.0.0.1:%g ${START_PORT} ${END_PORT}` --cluster-replicas 1
4646
fi
4747
tail -f /redis.log

redis/_parsers/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def parse_info(response):
3838
response = str_if_bytes(response)
3939

4040
def get_value(value):
41-
if "," not in value or "=" not in value:
41+
if "," not in value and "=" not in value:
4242
try:
4343
if "." in value:
4444
return float(value)

0 commit comments

Comments
 (0)