From 31bd67aa8b33205a86f6506c9e1c749a9a9c4ba6 Mon Sep 17 00:00:00 2001 From: Gael Le Mignot Date: Mon, 7 Jun 2021 10:15:26 +0200 Subject: [PATCH] Added redis for chat/notification --- Dockerfile | 3 +-- app/bin/wait.sh | 1 + docker-compose.yml | 8 ++++++++ requirements.txt | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e100361b..0ed62a73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,9 +46,8 @@ RUN pip3 install -r requirements.txt COPY requirements-dev.txt /srv ARG dev=0 -RUN echo "${dev}" RUN if [ "${dev}" = "1" ]; then pip3 install -r requirements-dev.txt; fi -RUN if [ "${dev}" = "1" ]; then apt-get -y install less nano postgresql-client; fi +RUN if [ "${dev}" = "1" ]; then apt-get -y install less nano postgresql-client redis-tools; fi COPY lib /srv/lib COPY bin/build/local/setup_lib.sh /srv diff --git a/app/bin/wait.sh b/app/bin/wait.sh index 0d92f08c..e4c94500 100755 --- a/app/bin/wait.sh +++ b/app/bin/wait.sh @@ -1,3 +1,4 @@ #!/bin/sh /srv/bin/misc/wait-for-it/wait-for-it.sh -h $DB_HOST -p $DB_PORT; +/srv/bin/misc/wait-for-it/wait-for-it.sh -h redis -p 6379; diff --git a/docker-compose.yml b/docker-compose.yml index 1286bc5d..c80c38a1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -42,6 +42,14 @@ services: - -I 128m - -v + redis: + image: redis + entrypoint: + - redis-server + - --appendonly yes + volumes: + - ./var/redis:/data + volumes: app: db: diff --git a/requirements.txt b/requirements.txt index d026cc76..46a3f9b5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -25,3 +25,4 @@ weasyprint==52.5 xlrd==2.0.1 xlwt==1.3.0 psycopg2==2.8.6 +redis==3.5.3 -- 2.39.5