Skip to content

Commit

Permalink
Support for unstable docker (#1842)
Browse files Browse the repository at this point in the history
  • Loading branch information
chayim authored Dec 30, 2021
1 parent bc3dbb4 commit 231d402
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
18 changes: 18 additions & 0 deletions docker/base/Dockerfile.unstable
Original file line number Diff line number Diff line change
@@ -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"]
3 changes: 3 additions & 0 deletions docker/unstable/redis.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
port 6378
protected-mode no
save ""
10 changes: 10 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -108,6 +117,7 @@ deps =
-r {toxinidir}/requirements.txt
-r {toxinidir}/dev_requirements.txt
docker =
unstable
master
replica
sentinel_1
Expand Down

0 comments on commit 231d402

Please sign in to comment.