summaryrefslogtreecommitdiffstats
path: root/16.0
diff options
context:
space:
mode:
authorJ0WI <J0WI@users.noreply.github.com>2019-04-26 15:49:59 +0200
committerJ0WI <J0WI@users.noreply.github.com>2019-04-26 15:49:59 +0200
commit83ea69d54bea72e1df9a2647ee101c73deb86d44 (patch)
tree50b5e819c78dc8262827ae5a8d27edd680da41a5 /16.0
parent45b1779c6f08f7a5e347f45ca28449def36bf663 (diff)
Add Redis session handler
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
Diffstat (limited to '16.0')
-rwxr-xr-x16.0/apache/entrypoint.sh9
-rwxr-xr-x16.0/fpm-alpine/entrypoint.sh9
-rwxr-xr-x16.0/fpm/entrypoint.sh9
3 files changed, 27 insertions, 0 deletions
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