diff --git a/14.0/apache/entrypoint.sh b/14.0/apache/entrypoint.sh index 6ef2540e..78bd0a8d 100755 --- a/14.0/apache/entrypoint.sh +++ b/14.0/apache/entrypoint.sh @@ -20,6 +20,15 @@ run_as() { } if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then + if [ -n "${REDIS_HOST+x}" ]; then + + echo "Configuring Redis as session handler" + { + echo 'session.save_handler = redis' + echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + } > /usr/local/etc/php/conf.d/redis-session.ini + fi + installed_version="0.0.0.0" if [ -f /var/www/html/version.php ]; then # shellcheck disable=SC2016 diff --git a/14.0/fpm-alpine/entrypoint.sh b/14.0/fpm-alpine/entrypoint.sh index 6ef2540e..78bd0a8d 100755 --- a/14.0/fpm-alpine/entrypoint.sh +++ b/14.0/fpm-alpine/entrypoint.sh @@ -20,6 +20,15 @@ run_as() { } if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then + if [ -n "${REDIS_HOST+x}" ]; then + + echo "Configuring Redis as session handler" + { + echo 'session.save_handler = redis' + echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + } > /usr/local/etc/php/conf.d/redis-session.ini + fi + installed_version="0.0.0.0" if [ -f /var/www/html/version.php ]; then # shellcheck disable=SC2016 diff --git a/14.0/fpm/entrypoint.sh b/14.0/fpm/entrypoint.sh index 6ef2540e..78bd0a8d 100755 --- a/14.0/fpm/entrypoint.sh +++ b/14.0/fpm/entrypoint.sh @@ -20,6 +20,15 @@ run_as() { } if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then + if [ -n "${REDIS_HOST+x}" ]; then + + echo "Configuring Redis as session handler" + { + echo 'session.save_handler = redis' + echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + } > /usr/local/etc/php/conf.d/redis-session.ini + fi + installed_version="0.0.0.0" if [ -f /var/www/html/version.php ]; then # shellcheck disable=SC2016 diff --git a/15.0/apache/entrypoint.sh b/15.0/apache/entrypoint.sh index 6ef2540e..78bd0a8d 100755 --- a/15.0/apache/entrypoint.sh +++ b/15.0/apache/entrypoint.sh @@ -20,6 +20,15 @@ run_as() { } if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then + if [ -n "${REDIS_HOST+x}" ]; then + + echo "Configuring Redis as session handler" + { + echo 'session.save_handler = redis' + echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + } > /usr/local/etc/php/conf.d/redis-session.ini + fi + installed_version="0.0.0.0" if [ -f /var/www/html/version.php ]; then # shellcheck disable=SC2016 diff --git a/15.0/fpm-alpine/entrypoint.sh b/15.0/fpm-alpine/entrypoint.sh index 6ef2540e..78bd0a8d 100755 --- a/15.0/fpm-alpine/entrypoint.sh +++ b/15.0/fpm-alpine/entrypoint.sh @@ -20,6 +20,15 @@ run_as() { } if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then + if [ -n "${REDIS_HOST+x}" ]; then + + echo "Configuring Redis as session handler" + { + echo 'session.save_handler = redis' + echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + } > /usr/local/etc/php/conf.d/redis-session.ini + fi + installed_version="0.0.0.0" if [ -f /var/www/html/version.php ]; then # shellcheck disable=SC2016 diff --git a/15.0/fpm/entrypoint.sh b/15.0/fpm/entrypoint.sh index 6ef2540e..78bd0a8d 100755 --- a/15.0/fpm/entrypoint.sh +++ b/15.0/fpm/entrypoint.sh @@ -20,6 +20,15 @@ run_as() { } if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then + if [ -n "${REDIS_HOST+x}" ]; then + + echo "Configuring Redis as session handler" + { + echo 'session.save_handler = redis' + echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + } > /usr/local/etc/php/conf.d/redis-session.ini + fi + installed_version="0.0.0.0" if [ -f /var/www/html/version.php ]; then # shellcheck disable=SC2016 diff --git a/16.0/apache/entrypoint.sh b/16.0/apache/entrypoint.sh index 6ef2540e..78bd0a8d 100755 --- a/16.0/apache/entrypoint.sh +++ b/16.0/apache/entrypoint.sh @@ -20,6 +20,15 @@ run_as() { } if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then + if [ -n "${REDIS_HOST+x}" ]; then + + echo "Configuring Redis as session handler" + { + echo 'session.save_handler = redis' + echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + } > /usr/local/etc/php/conf.d/redis-session.ini + fi + installed_version="0.0.0.0" if [ -f /var/www/html/version.php ]; then # shellcheck disable=SC2016 diff --git a/16.0/fpm-alpine/entrypoint.sh b/16.0/fpm-alpine/entrypoint.sh index 6ef2540e..78bd0a8d 100755 --- a/16.0/fpm-alpine/entrypoint.sh +++ b/16.0/fpm-alpine/entrypoint.sh @@ -20,6 +20,15 @@ run_as() { } if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then + if [ -n "${REDIS_HOST+x}" ]; then + + echo "Configuring Redis as session handler" + { + echo 'session.save_handler = redis' + echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + } > /usr/local/etc/php/conf.d/redis-session.ini + fi + installed_version="0.0.0.0" if [ -f /var/www/html/version.php ]; then # shellcheck disable=SC2016 diff --git a/16.0/fpm/entrypoint.sh b/16.0/fpm/entrypoint.sh index 6ef2540e..78bd0a8d 100755 --- a/16.0/fpm/entrypoint.sh +++ b/16.0/fpm/entrypoint.sh @@ -20,6 +20,15 @@ run_as() { } if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then + if [ -n "${REDIS_HOST+x}" ]; then + + echo "Configuring Redis as session handler" + { + echo 'session.save_handler = redis' + echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + } > /usr/local/etc/php/conf.d/redis-session.ini + fi + installed_version="0.0.0.0" if [ -f /var/www/html/version.php ]; then # shellcheck disable=SC2016 diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 6ef2540e..78bd0a8d 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -20,6 +20,15 @@ run_as() { } if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then + if [ -n "${REDIS_HOST+x}" ]; then + + echo "Configuring Redis as session handler" + { + echo 'session.save_handler = redis' + echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + } > /usr/local/etc/php/conf.d/redis-session.ini + fi + installed_version="0.0.0.0" if [ -f /var/www/html/version.php ]; then # shellcheck disable=SC2016