summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralgakzru <algakzru@gmail.com>2019-09-10 08:31:16 +0800
committerJ0WI <J0WI@users.noreply.github.com>2019-09-10 02:31:16 +0200
commit73ff5c860d155d46ed65b6ae9caa9ee6e64478de (patch)
treef2ffb27acfb5e070c93a05f6428fa9485fdb7f92
parent892ac14791fc3ebbb201f23584ca34f83e33e8a1 (diff)
-rw-r--r--.config/redis.config.php1
-rw-r--r--14.0/apache/config/redis.config.php1
-rwxr-xr-x14.0/apache/entrypoint.sh7
-rw-r--r--14.0/fpm-alpine/config/redis.config.php1
-rwxr-xr-x14.0/fpm-alpine/entrypoint.sh7
-rw-r--r--14.0/fpm/config/redis.config.php1
-rwxr-xr-x14.0/fpm/entrypoint.sh7
-rw-r--r--15.0/apache/config/redis.config.php1
-rwxr-xr-x15.0/apache/entrypoint.sh7
-rw-r--r--15.0/fpm-alpine/config/redis.config.php1
-rwxr-xr-x15.0/fpm-alpine/entrypoint.sh7
-rw-r--r--15.0/fpm/config/redis.config.php1
-rwxr-xr-x15.0/fpm/entrypoint.sh7
-rw-r--r--16.0/apache/config/redis.config.php1
-rwxr-xr-x16.0/apache/entrypoint.sh7
-rw-r--r--16.0/fpm-alpine/config/redis.config.php1
-rwxr-xr-x16.0/fpm-alpine/entrypoint.sh7
-rw-r--r--16.0/fpm/config/redis.config.php1
-rwxr-xr-x16.0/fpm/entrypoint.sh7
-rw-r--r--17.0-beta/apache/config/redis.config.php1
-rwxr-xr-x17.0-beta/apache/entrypoint.sh7
-rw-r--r--17.0-beta/fpm-alpine/config/redis.config.php1
-rwxr-xr-x17.0-beta/fpm-alpine/entrypoint.sh7
-rw-r--r--17.0-beta/fpm/config/redis.config.php1
-rwxr-xr-x17.0-beta/fpm/entrypoint.sh7
-rw-r--r--README.md1
-rwxr-xr-xdocker-entrypoint.sh7
27 files changed, 92 insertions, 13 deletions
diff --git a/.config/redis.config.php b/.config/redis.config.php
index 5df799f2..19676160 100644
--- a/.config/redis.config.php
+++ b/.config/redis.config.php
@@ -6,6 +6,7 @@ if (getenv('REDIS_HOST')) {
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_HOST_PORT') ?: 6379,
+ 'password' => getenv('REDIS_HOST_PASSWORD'),
),
);
}
diff --git a/14.0/apache/config/redis.config.php b/14.0/apache/config/redis.config.php
index 5df799f2..19676160 100644
--- a/14.0/apache/config/redis.config.php
+++ b/14.0/apache/config/redis.config.php
@@ -6,6 +6,7 @@ if (getenv('REDIS_HOST')) {
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_HOST_PORT') ?: 6379,
+ 'password' => getenv('REDIS_HOST_PASSWORD'),
),
);
}
diff --git a/14.0/apache/entrypoint.sh b/14.0/apache/entrypoint.sh
index 0be9d287..9514d881 100755
--- a/14.0/apache/entrypoint.sh
+++ b/14.0/apache/entrypoint.sh
@@ -25,7 +25,12 @@ 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}\""
+ # check if redis password has been set
+ if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\""
+ else
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
+ fi
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
diff --git a/14.0/fpm-alpine/config/redis.config.php b/14.0/fpm-alpine/config/redis.config.php
index 5df799f2..19676160 100644
--- a/14.0/fpm-alpine/config/redis.config.php
+++ b/14.0/fpm-alpine/config/redis.config.php
@@ -6,6 +6,7 @@ if (getenv('REDIS_HOST')) {
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_HOST_PORT') ?: 6379,
+ 'password' => getenv('REDIS_HOST_PASSWORD'),
),
);
}
diff --git a/14.0/fpm-alpine/entrypoint.sh b/14.0/fpm-alpine/entrypoint.sh
index 0be9d287..9514d881 100755
--- a/14.0/fpm-alpine/entrypoint.sh
+++ b/14.0/fpm-alpine/entrypoint.sh
@@ -25,7 +25,12 @@ 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}\""
+ # check if redis password has been set
+ if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\""
+ else
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
+ fi
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
diff --git a/14.0/fpm/config/redis.config.php b/14.0/fpm/config/redis.config.php
index 5df799f2..19676160 100644
--- a/14.0/fpm/config/redis.config.php
+++ b/14.0/fpm/config/redis.config.php
@@ -6,6 +6,7 @@ if (getenv('REDIS_HOST')) {
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_HOST_PORT') ?: 6379,
+ 'password' => getenv('REDIS_HOST_PASSWORD'),
),
);
}
diff --git a/14.0/fpm/entrypoint.sh b/14.0/fpm/entrypoint.sh
index 0be9d287..9514d881 100755
--- a/14.0/fpm/entrypoint.sh
+++ b/14.0/fpm/entrypoint.sh
@@ -25,7 +25,12 @@ 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}\""
+ # check if redis password has been set
+ if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\""
+ else
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
+ fi
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
diff --git a/15.0/apache/config/redis.config.php b/15.0/apache/config/redis.config.php
index 5df799f2..19676160 100644
--- a/15.0/apache/config/redis.config.php
+++ b/15.0/apache/config/redis.config.php
@@ -6,6 +6,7 @@ if (getenv('REDIS_HOST')) {
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_HOST_PORT') ?: 6379,
+ 'password' => getenv('REDIS_HOST_PASSWORD'),
),
);
}
diff --git a/15.0/apache/entrypoint.sh b/15.0/apache/entrypoint.sh
index 0be9d287..9514d881 100755
--- a/15.0/apache/entrypoint.sh
+++ b/15.0/apache/entrypoint.sh
@@ -25,7 +25,12 @@ 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}\""
+ # check if redis password has been set
+ if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\""
+ else
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
+ fi
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
diff --git a/15.0/fpm-alpine/config/redis.config.php b/15.0/fpm-alpine/config/redis.config.php
index 5df799f2..19676160 100644
--- a/15.0/fpm-alpine/config/redis.config.php
+++ b/15.0/fpm-alpine/config/redis.config.php
@@ -6,6 +6,7 @@ if (getenv('REDIS_HOST')) {
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_HOST_PORT') ?: 6379,
+ 'password' => getenv('REDIS_HOST_PASSWORD'),
),
);
}
diff --git a/15.0/fpm-alpine/entrypoint.sh b/15.0/fpm-alpine/entrypoint.sh
index 0be9d287..9514d881 100755
--- a/15.0/fpm-alpine/entrypoint.sh
+++ b/15.0/fpm-alpine/entrypoint.sh
@@ -25,7 +25,12 @@ 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}\""
+ # check if redis password has been set
+ if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\""
+ else
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
+ fi
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
diff --git a/15.0/fpm/config/redis.config.php b/15.0/fpm/config/redis.config.php
index 5df799f2..19676160 100644
--- a/15.0/fpm/config/redis.config.php
+++ b/15.0/fpm/config/redis.config.php
@@ -6,6 +6,7 @@ if (getenv('REDIS_HOST')) {
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_HOST_PORT') ?: 6379,
+ 'password' => getenv('REDIS_HOST_PASSWORD'),
),
);
}
diff --git a/15.0/fpm/entrypoint.sh b/15.0/fpm/entrypoint.sh
index 0be9d287..9514d881 100755
--- a/15.0/fpm/entrypoint.sh
+++ b/15.0/fpm/entrypoint.sh
@@ -25,7 +25,12 @@ 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}\""
+ # check if redis password has been set
+ if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\""
+ else
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
+ fi
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
diff --git a/16.0/apache/config/redis.config.php b/16.0/apache/config/redis.config.php
index 5df799f2..19676160 100644
--- a/16.0/apache/config/redis.config.php
+++ b/16.0/apache/config/redis.config.php
@@ -6,6 +6,7 @@ if (getenv('REDIS_HOST')) {
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_HOST_PORT') ?: 6379,
+ 'password' => getenv('REDIS_HOST_PASSWORD'),
),
);
}
diff --git a/16.0/apache/entrypoint.sh b/16.0/apache/entrypoint.sh
index 0be9d287..9514d881 100755
--- a/16.0/apache/entrypoint.sh
+++ b/16.0/apache/entrypoint.sh
@@ -25,7 +25,12 @@ 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}\""
+ # check if redis password has been set
+ if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\""
+ else
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
+ fi
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
diff --git a/16.0/fpm-alpine/config/redis.config.php b/16.0/fpm-alpine/config/redis.config.php
index 5df799f2..19676160 100644
--- a/16.0/fpm-alpine/config/redis.config.php
+++ b/16.0/fpm-alpine/config/redis.config.php
@@ -6,6 +6,7 @@ if (getenv('REDIS_HOST')) {
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_HOST_PORT') ?: 6379,
+ 'password' => getenv('REDIS_HOST_PASSWORD'),
),
);
}
diff --git a/16.0/fpm-alpine/entrypoint.sh b/16.0/fpm-alpine/entrypoint.sh
index 0be9d287..9514d881 100755
--- a/16.0/fpm-alpine/entrypoint.sh
+++ b/16.0/fpm-alpine/entrypoint.sh
@@ -25,7 +25,12 @@ 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}\""
+ # check if redis password has been set
+ if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\""
+ else
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
+ fi
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
diff --git a/16.0/fpm/config/redis.config.php b/16.0/fpm/config/redis.config.php
index 5df799f2..19676160 100644
--- a/16.0/fpm/config/redis.config.php
+++ b/16.0/fpm/config/redis.config.php
@@ -6,6 +6,7 @@ if (getenv('REDIS_HOST')) {
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_HOST_PORT') ?: 6379,
+ 'password' => getenv('REDIS_HOST_PASSWORD'),
),
);
}
diff --git a/16.0/fpm/entrypoint.sh b/16.0/fpm/entrypoint.sh
index 0be9d287..9514d881 100755
--- a/16.0/fpm/entrypoint.sh
+++ b/16.0/fpm/entrypoint.sh
@@ -25,7 +25,12 @@ 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}\""
+ # check if redis password has been set
+ if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\""
+ else
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
+ fi
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
diff --git a/17.0-beta/apache/config/redis.config.php b/17.0-beta/apache/config/redis.config.php
index 5df799f2..19676160 100644
--- a/17.0-beta/apache/config/redis.config.php
+++ b/17.0-beta/apache/config/redis.config.php
@@ -6,6 +6,7 @@ if (getenv('REDIS_HOST')) {
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_HOST_PORT') ?: 6379,
+ 'password' => getenv('REDIS_HOST_PASSWORD'),
),
);
}
diff --git a/17.0-beta/apache/entrypoint.sh b/17.0-beta/apache/entrypoint.sh
index 0be9d287..9514d881 100755
--- a/17.0-beta/apache/entrypoint.sh
+++ b/17.0-beta/apache/entrypoint.sh
@@ -25,7 +25,12 @@ 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}\""
+ # check if redis password has been set
+ if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\""
+ else
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
+ fi
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
diff --git a/17.0-beta/fpm-alpine/config/redis.config.php b/17.0-beta/fpm-alpine/config/redis.config.php
index 5df799f2..19676160 100644
--- a/17.0-beta/fpm-alpine/config/redis.config.php
+++ b/17.0-beta/fpm-alpine/config/redis.config.php
@@ -6,6 +6,7 @@ if (getenv('REDIS_HOST')) {
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_HOST_PORT') ?: 6379,
+ 'password' => getenv('REDIS_HOST_PASSWORD'),
),
);
}
diff --git a/17.0-beta/fpm-alpine/entrypoint.sh b/17.0-beta/fpm-alpine/entrypoint.sh
index 0be9d287..9514d881 100755
--- a/17.0-beta/fpm-alpine/entrypoint.sh
+++ b/17.0-beta/fpm-alpine/entrypoint.sh
@@ -25,7 +25,12 @@ 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}\""
+ # check if redis password has been set
+ if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\""
+ else
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
+ fi
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
diff --git a/17.0-beta/fpm/config/redis.config.php b/17.0-beta/fpm/config/redis.config.php
index 5df799f2..19676160 100644
--- a/17.0-beta/fpm/config/redis.config.php
+++ b/17.0-beta/fpm/config/redis.config.php
@@ -6,6 +6,7 @@ if (getenv('REDIS_HOST')) {
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_HOST_PORT') ?: 6379,
+ 'password' => getenv('REDIS_HOST_PASSWORD'),
),
);
}
diff --git a/17.0-beta/fpm/entrypoint.sh b/17.0-beta/fpm/entrypoint.sh
index 0be9d287..9514d881 100755
--- a/17.0-beta/fpm/entrypoint.sh
+++ b/17.0-beta/fpm/entrypoint.sh
@@ -25,7 +25,12 @@ 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}\""
+ # check if redis password has been set
+ if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\""
+ else
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
+ fi
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
diff --git a/README.md b/README.md
index 22a61007..85f4409c 100644
--- a/README.md
+++ b/README.md
@@ -141,6 +141,7 @@ If you want to use Redis you have to create a separate [Redis](https://hub.docke
- `REDIS_HOST` (not set by default) Name of Redis container
- `REDIS_HOST_PORT` (default: _6379_) Optional port for Redis, only use for external Redis servers that run on non-standard ports.
+- `REDIS_HOST_PASSWORD` (not set by default) Redis password
The use of Redis is recommended to prevent file locking problems. See the examples for further instructions.
diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh
index 0be9d287..9514d881 100755
--- a/docker-entrypoint.sh
+++ b/docker-entrypoint.sh
@@ -25,7 +25,12 @@ 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}\""
+ # check if redis password has been set
+ if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\""
+ else
+ echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
+ fi
} > /usr/local/etc/php/conf.d/redis-session.ini
fi