From 19504246dff0ca2dd45c3ca906e7dc868b7c9aae Mon Sep 17 00:00:00 2001 From: Alex Fernandes <84147256+AlexFernandes-MOVAI@users.noreply.github.com> Date: Mon, 20 Feb 2023 12:09:14 +0000 Subject: [PATCH 1/4] add redis-search module --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 707f464..0db4fd4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,13 +13,16 @@ ENV REDIS_PORT 6379 # hadolint ignore=DL3008 RUN apt-get update &&\ - apt-get -y install --no-install-recommends redis-tools \ + apt-get -y install --no-install-recommends redis-tools redis-redisearch \ build-essential apt-transport-https curl python3 python3-dev python3-pip python3-setuptools software-properties-common unzip wget gnupg &&\ apt-get clean -y > /dev/null &&\ /usr/bin/pip3 install wheel rdbtools python-lzf &&\ rm -rf /var/cache/apt/* &&\ rm -rf /var/lib/apt/lists/* &&\ rm -rf /tmp/* &&\ - mkdir -p /default + mkdir -p /default &&\ + chown -R redis:redis /usr/lib/redis/modules/redisearch.so &&\ + chmod -R 755 /usr/lib/redis/modules/redisearch.so &&\ + echo 'loadmodule /usr/lib/redis/modules/redisearch.so' >> /etc/redis/redis.conf ENTRYPOINT ["movai-entrypoint.sh","/etc/redis.conf"] From e4ecd6b8af95107c949b1a32dba89b2a22920a76 Mon Sep 17 00:00:00 2001 From: Moawiya Mograbi Date: Mon, 20 Feb 2023 14:54:31 +0200 Subject: [PATCH 2/4] fixed loadmodule --- Dockerfile | 3 +-- files/etc/redis.conf | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0db4fd4..d1c02d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,6 @@ RUN apt-get update &&\ rm -rf /tmp/* &&\ mkdir -p /default &&\ chown -R redis:redis /usr/lib/redis/modules/redisearch.so &&\ - chmod -R 755 /usr/lib/redis/modules/redisearch.so &&\ - echo 'loadmodule /usr/lib/redis/modules/redisearch.so' >> /etc/redis/redis.conf + chmod -R 755 /usr/lib/redis/modules/redisearch.so ENTRYPOINT ["movai-entrypoint.sh","/etc/redis.conf"] diff --git a/files/etc/redis.conf b/files/etc/redis.conf index a6accb1..2b90480 100644 --- a/files/etc/redis.conf +++ b/files/etc/redis.conf @@ -43,6 +43,7 @@ # loadmodule /path/to/my_module.so # loadmodule /path/to/other_module.so loadmodule /usr/lib/redis/modules/rejson.so +loadmodule /usr/lib/redis/modules/redisearch.so ################################## NETWORK ##################################### # By default, if no "bind" configuration directive is specified, Redis listens From 766412811cb21b58610670177b06b97b059cd642 Mon Sep 17 00:00:00 2001 From: Alex Fernandes <84147256+AlexFernandes-MOVAI@users.noreply.github.com> Date: Wed, 22 Feb 2023 11:10:15 +0000 Subject: [PATCH 3/4] redis-stack-server base to get more features --- Dockerfile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index d1c02d8..955cc2f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # This Dockerfile is the base image for Mov.ai Redis -FROM redislabs/rejson:2.0.11 +FROM redis-stack-server:6.2.6-v4 # Labels LABEL description="MOV.AI Redis Image" LABEL maintainer="maintainer@mov.ai" @@ -13,15 +13,12 @@ ENV REDIS_PORT 6379 # hadolint ignore=DL3008 RUN apt-get update &&\ - apt-get -y install --no-install-recommends redis-tools redis-redisearch \ + apt-get -y install --no-install-recommends redis-tools \ build-essential apt-transport-https curl python3 python3-dev python3-pip python3-setuptools software-properties-common unzip wget gnupg &&\ apt-get clean -y > /dev/null &&\ /usr/bin/pip3 install wheel rdbtools python-lzf &&\ rm -rf /var/cache/apt/* &&\ rm -rf /var/lib/apt/lists/* &&\ - rm -rf /tmp/* &&\ - mkdir -p /default &&\ - chown -R redis:redis /usr/lib/redis/modules/redisearch.so &&\ - chmod -R 755 /usr/lib/redis/modules/redisearch.so + rm -rf /tmp/* ENTRYPOINT ["movai-entrypoint.sh","/etc/redis.conf"] From 5c5d38c5f74cf5ddcaf1ec0b489da9d8f69c188b Mon Sep 17 00:00:00 2001 From: Alex Fernandes <84147256+AlexFernandes-MOVAI@users.noreply.github.com> Date: Wed, 22 Feb 2023 11:11:45 +0000 Subject: [PATCH 4/4] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 955cc2f..4797bae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # This Dockerfile is the base image for Mov.ai Redis -FROM redis-stack-server:6.2.6-v4 +FROM redis/redis-stack-server:6.2.6-v4 # Labels LABEL description="MOV.AI Redis Image" LABEL maintainer="maintainer@mov.ai"