summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChayim <chayim@users.noreply.github.com>2021-12-30 13:58:46 +0200
committerGitHub <noreply@github.com>2021-12-30 13:58:46 +0200
commit231d40275e57bfdf8cc3b98642e886fae9433389 (patch)
treeb3133909963573a387017c5df42cb6ed5f5f13a1
parentbc3dbb45d7236f96d614c33684a94f3e0fd9ac4a (diff)
downloadredis-py-231d40275e57bfdf8cc3b98642e886fae9433389.tar.gz
Support for unstable docker (#1842)
-rw-r--r--CONTRIBUTING.md3
-rw-r--r--docker/base/Dockerfile.unstable18
-rw-r--r--docker/unstable/redis.conf3
-rw-r--r--tox.ini10
4 files changed, 33 insertions, 1 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 0f9ca0b..ebb66bb 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -57,8 +57,9 @@ can execute docker and its various commands.
- A master Redis node
- A Redis replica node
- Three sentinel Redis nodes
-- A multi-python docker, with your source code mounted in /data
+- A redis cluster
- An stunnel docker, fronting the master Redis node
+- A Redis node, running unstable - the latest redis
The replica node, is a replica of the master node, using the
[leader-follower replication](https://redis.io/topics/replication)
diff --git a/docker/base/Dockerfile.unstable b/docker/base/Dockerfile.unstable
new file mode 100644
index 0000000..ab5b7fc
--- /dev/null
+++ b/docker/base/Dockerfile.unstable
@@ -0,0 +1,18 @@
+# produces redisfab/redis-py:unstable
+FROM ubuntu:bionic as builder
+RUN apt-get update
+RUN apt-get upgrade -y
+RUN apt-get install -y build-essential git
+RUN mkdir /build
+WORKDIR /build
+RUN git clone https://github.com/redis/redis
+WORKDIR /build/redis
+RUN make
+
+FROM ubuntu:bionic as runner
+COPY --from=builder /build/redis/src/redis-server /usr/bin/redis-server
+COPY --from=builder /build/redis/src/redis-cli /usr/bin/redis-cli
+COPY --from=builder /build/redis/src/redis-sentinel /usr/bin/redis-sentinel
+
+EXPOSE 6379
+CMD ["redis-server", "/redis.conf"]
diff --git a/docker/unstable/redis.conf b/docker/unstable/redis.conf
new file mode 100644
index 0000000..93a55cf
--- /dev/null
+++ b/docker/unstable/redis.conf
@@ -0,0 +1,3 @@
+port 6378
+protected-mode no
+save ""
diff --git a/tox.ini b/tox.ini
index 3ca4533..ac7f01a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -32,6 +32,15 @@ healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(sock
volumes =
bind:rw:{toxinidir}/docker/replica/redis.conf:/redis.conf
+[docker:unstable]
+name = unstable
+image = redisfab/redis-py:unstable-bionic
+ports =
+ 6378:6378/tcp
+healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',6378)) else False"
+volumes =
+ bind:rw:{toxinidir}/docker/unstable/redis.conf:/redis.conf
+
[docker:sentinel_1]
name = sentinel_1
@@ -108,6 +117,7 @@ deps =
-r {toxinidir}/requirements.txt
-r {toxinidir}/dev_requirements.txt
docker =
+ unstable
master
replica
sentinel_1