diff --git a/Dockerfile b/Dockerfile index d845507e7f..8a7196860d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,8 +6,8 @@ LABEL maintainer="tech@appsmith.com" WORKDIR /opt/appsmith # The env variables are needed for Appsmith server to correctly handle non-roman scripts like Arabic. -ENV LANG C.UTF-8 -ENV LC_ALL C.UTF-8 +ENV LANG C.UTF-8 +ENV LC_ALL C.UTF-8 # Update APT packages - Base Layer RUN apt-get update \ @@ -27,7 +27,7 @@ RUN wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add - RUN echo "deb [ arch=amd64,arm64 ]http://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.4.list \ && apt-get remove wget -y RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \ - && apt-get -y install --no-install-recommends -y mongodb-org=4.4.6 nodejs redis \ + && apt-get -y install --no-install-recommends -y mongodb-org=4.4.6 nodejs redis build-essential \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* diff --git a/deploy/docker/entrypoint.sh b/deploy/docker/entrypoint.sh index 7a4a4dfafb..e14b523cf7 100755 --- a/deploy/docker/entrypoint.sh +++ b/deploy/docker/entrypoint.sh @@ -194,6 +194,26 @@ configure_supervisord() { fi } +# This is a workaround to get Redis working on diffent memory pagesize +# https://github.com/appsmithorg/appsmith/issues/11773 +check_redis_compatible_page_size() { + local page_size + page_size="$(getconf PAGE_SIZE)" + if [[ $page_size -gt 4096 ]]; then + echo "Compile Redis stable with page size of $page_size" + echo "Downloading Redis source..." + curl https://download.redis.io/redis-stable.tar.gz -L | tar xvz + cd redis-stable/ + echo "Compiling Redis from source..." + make && make install + echo "Cleaning up Redis source..." + cd .. + rm -rf redis-stable/ + else + echo "Redis is compatible with page size of $page_size" + fi +} + # Main Section init_env_file unset_unused_variables @@ -204,6 +224,7 @@ if [[ -z "${DYNO}" ]]; then init_replica_set fi mount_letsencrypt_directory +check_redis_compatible_page_size # These functions are used to limit heap size for Backend process when deployed on Heroku get_maximum_heap setup_backend_heap_arg