From b9b251686f14887943ee215ed3250b8946c7cc43 Mon Sep 17 00:00:00 2001 From: erickgonzalez Date: Fri, 8 Sep 2023 11:10:25 -0600 Subject: [PATCH] #24294 include in 23.01.7 --- docker/dotcms/ROOT/srv/00-config-defaults.sh | 14 ++++++++++++++ docker/dotcms/ROOT/srv/30-override-config-props.sh | 6 ++++++ .../ROOT/srv/OVERRIDE/tomcat/conf/context.xml | 3 +++ docker/dotcms/ROOT/srv/entrypoint.sh | 1 + hotfix_tracking.md | 2 ++ 5 files changed, 26 insertions(+) create mode 100644 docker/dotcms/ROOT/srv/30-override-config-props.sh diff --git a/docker/dotcms/ROOT/srv/00-config-defaults.sh b/docker/dotcms/ROOT/srv/00-config-defaults.sh index 8308adf25255..1e598e001341 100755 --- a/docker/dotcms/ROOT/srv/00-config-defaults.sh +++ b/docker/dotcms/ROOT/srv/00-config-defaults.sh @@ -31,6 +31,20 @@ export DOT_MAIL_SMTP_SSL_PROTOCOLS=${DOT_MAIL_SMTP_SSL_PROTOCOLS:-"TLSv1.2"} # Cookie Args export DOT_SAMESITE_COOKIES=${DOT_SAMESITE_COOKIES:-"lax"} +#Tomcat Redis +if [[ "${TOMCAT_REDIS_SESSION_ENABLED}" == 'true' ]]; then + export TOMCAT_REDIS_SESSION_CONFIG=${TOMCAT_REDIS_SESSION_CONFIG:-''} + export TOMCAT_REDIS_SESSION_HOST=${TOMCAT_REDIS_SESSION_HOST:-"redis"} + export TOMCAT_REDIS_SESSION_PORT=${TOMCAT_REDIS_SESSION_PORT:-"6379"} + export TOMCAT_REDIS_SESSION_PASSWORD=${TOMCAT_REDIS_SESSION_PASSWORD:-""} + export TOMCAT_REDIS_SESSION_SSL_ENABLED=${TOMCAT_REDIS_SESSION_SSL_ENABLED:-"false"} + export TOMCAT_REDIS_SESSION_SENTINEL_MASTER=${TOMCAT_REDIS_SESSION_SENTINEL_MASTER} + export TOMCAT_REDIS_SESSION_SENTINELS=${TOMCAT_REDIS_SESSION_SENTINELS} + export TOMCAT_REDIS_SESSION_DATABASE=${TOMCAT_REDIS_SESSION_DATABASE:-"0"} + export TOMCAT_REDIS_SESSION_TIMEOUT=${TOMCAT_REDIS_SESSION_TIMEOUT:-"2000"} + export TOMCAT_REDIS_SESSION_PERSISTENT_POLICIES=${TOMCAT_REDIS_SESSION_PERSISTENT_POLICIES} +fi + # tomcat gzip compression export CMS_COMPRESSION=${CMS_COMPRESSION:-"on"} diff --git a/docker/dotcms/ROOT/srv/30-override-config-props.sh b/docker/dotcms/ROOT/srv/30-override-config-props.sh new file mode 100644 index 000000000000..b38a72d085e0 --- /dev/null +++ b/docker/dotcms/ROOT/srv/30-override-config-props.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +set -e + +# If enabled, add the required config for Tomcat Session Management with Redis +sed -i "s,\${TOMCAT_REDIS_SESSION_CONFIG},${TOMCAT_REDIS_SESSION_CONFIG},g" $TOMCAT_HOME/conf/context.xml \ No newline at end of file diff --git a/docker/dotcms/ROOT/srv/OVERRIDE/tomcat/conf/context.xml b/docker/dotcms/ROOT/srv/OVERRIDE/tomcat/conf/context.xml index 42d39871008c..4a870d391c3e 100644 --- a/docker/dotcms/ROOT/srv/OVERRIDE/tomcat/conf/context.xml +++ b/docker/dotcms/ROOT/srv/OVERRIDE/tomcat/conf/context.xml @@ -28,4 +28,7 @@ + + ${TOMCAT_REDIS_SESSION_CONFIG} + \ No newline at end of file diff --git a/docker/dotcms/ROOT/srv/entrypoint.sh b/docker/dotcms/ROOT/srv/entrypoint.sh index d12691d0b07e..64f49d399c7d 100644 --- a/docker/dotcms/ROOT/srv/entrypoint.sh +++ b/docker/dotcms/ROOT/srv/entrypoint.sh @@ -6,6 +6,7 @@ umask 007 source /srv/00-config-defaults.sh source /srv/20-copy-overriden-files.sh +source /srv/30-override-config-props.sh source /srv/40-custom-starter-zip.sh diff --git a/hotfix_tracking.md b/hotfix_tracking.md index 97c8fc38f640..2e7904da3d11 100644 --- a/hotfix_tracking.md +++ b/hotfix_tracking.md @@ -117,3 +117,5 @@ This maintenance release includes the following code fixes: 96. https://github.com/dotCMS/core/issues/24683 : Copy button on Page Edit portlet should copy the entire URL, not just the path #24683 **Release-23.01.7** + +97. https://github.com/dotCMS/core/issues/24294 : Implement Redisson Session sharing #24294