From: Gael Le Mignot Date: Mon, 7 Jun 2021 08:15:26 +0000 (+0200) Subject: Added redis for chat/notification X-Git-Tag: 2.1~66^2^2~36 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=31bd67aa8b33205a86f6506c9e1c749a9a9c4ba6;p=teleforma.git Added redis for chat/notification --- 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