From dfe84fcd627a66dbd34cd1ce742085e83bc36d7d Mon Sep 17 00:00:00 2001 From: epma01 <49983490+epma01@users.noreply.github.com> Date: Wed, 1 May 2019 21:14:15 +0200 Subject: [PATCH] Update docker-entrypoint.sh Broken Redis session handler with unix socket, can't login (#730) --- docker-entrypoint.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 78bd0a8d..69105e8e 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -25,7 +25,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP echo "Configuring Redis as session handler" { echo 'session.save_handler = redis' - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + if [[ ${REDIS_HOST:0:1} == "/" ]] ; then + echo "session.save_path = \"unix://${REDIS_HOST}?persistent=1&weight=1&database=0\"" + else + echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + fi } > /usr/local/etc/php/conf.d/redis-session.ini fi