mirror of
https://github.com/nextcloud/docker.git
synced 2024-12-26 02:56:13 +01:00
Add Redis session handler
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
This commit is contained in:
parent
45b1779c6f
commit
83ea69d54b
10 changed files with 90 additions and 0 deletions
|
@ -20,6 +20,15 @@ run_as() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
|
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"
|
installed_version="0.0.0.0"
|
||||||
if [ -f /var/www/html/version.php ]; then
|
if [ -f /var/www/html/version.php ]; then
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
|
|
|
@ -20,6 +20,15 @@ run_as() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
|
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"
|
installed_version="0.0.0.0"
|
||||||
if [ -f /var/www/html/version.php ]; then
|
if [ -f /var/www/html/version.php ]; then
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
|
|
|
@ -20,6 +20,15 @@ run_as() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
|
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"
|
installed_version="0.0.0.0"
|
||||||
if [ -f /var/www/html/version.php ]; then
|
if [ -f /var/www/html/version.php ]; then
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
|
|
|
@ -20,6 +20,15 @@ run_as() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
|
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"
|
installed_version="0.0.0.0"
|
||||||
if [ -f /var/www/html/version.php ]; then
|
if [ -f /var/www/html/version.php ]; then
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
|
|
|
@ -20,6 +20,15 @@ run_as() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
|
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"
|
installed_version="0.0.0.0"
|
||||||
if [ -f /var/www/html/version.php ]; then
|
if [ -f /var/www/html/version.php ]; then
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
|
|
|
@ -20,6 +20,15 @@ run_as() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
|
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"
|
installed_version="0.0.0.0"
|
||||||
if [ -f /var/www/html/version.php ]; then
|
if [ -f /var/www/html/version.php ]; then
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
|
|
|
@ -20,6 +20,15 @@ run_as() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
|
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"
|
installed_version="0.0.0.0"
|
||||||
if [ -f /var/www/html/version.php ]; then
|
if [ -f /var/www/html/version.php ]; then
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
|
|
|
@ -20,6 +20,15 @@ run_as() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
|
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"
|
installed_version="0.0.0.0"
|
||||||
if [ -f /var/www/html/version.php ]; then
|
if [ -f /var/www/html/version.php ]; then
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
|
|
|
@ -20,6 +20,15 @@ run_as() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
|
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"
|
installed_version="0.0.0.0"
|
||||||
if [ -f /var/www/html/version.php ]; then
|
if [ -f /var/www/html/version.php ]; then
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
|
|
|
@ -20,6 +20,15 @@ run_as() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
|
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"
|
installed_version="0.0.0.0"
|
||||||
if [ -f /var/www/html/version.php ]; then
|
if [ -f /var/www/html/version.php ]; then
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
|
|
Loading…
Reference in a new issue