diff options
author | J0WI <J0WI@users.noreply.github.com> | 2019-04-27 15:43:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-27 15:43:06 +0200 |
commit | da36b3afe64460f96847efe9d2eaa72d7f2a5a24 (patch) | |
tree | 50b5e819c78dc8262827ae5a8d27edd680da41a5 | |
parent | 45b1779c6f08f7a5e347f45ca28449def36bf663 (diff) | |
parent | 83ea69d54bea72e1df9a2647ee101c73deb86d44 (diff) |
Merge pull request #707 from J0WI/redis-session
Add Redis session handler
-rwxr-xr-x | 14.0/apache/entrypoint.sh | 9 | ||||
-rwxr-xr-x | 14.0/fpm-alpine/entrypoint.sh | 9 | ||||
-rwxr-xr-x | 14.0/fpm/entrypoint.sh | 9 | ||||
-rwxr-xr-x | 15.0/apache/entrypoint.sh | 9 | ||||
-rwxr-xr-x | 15.0/fpm-alpine/entrypoint.sh | 9 | ||||
-rwxr-xr-x | 15.0/fpm/entrypoint.sh | 9 | ||||
-rwxr-xr-x | 16.0/apache/entrypoint.sh | 9 | ||||
-rwxr-xr-x | 16.0/fpm-alpine/entrypoint.sh | 9 | ||||
-rwxr-xr-x | 16.0/fpm/entrypoint.sh | 9 | ||||
-rwxr-xr-x | docker-entrypoint.sh | 9 |
10 files changed, 90 insertions, 0 deletions
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 |