summaryrefslogtreecommitdiffstats
path: root/17.0-rc/apache/config/redis.config.php
diff options
context:
space:
mode:
authortilosp-bot <git-bot@tilosp.de>2020-07-14 22:32:04 +0200
committerGitHub <noreply@github.com>2020-07-14 20:32:04 +0000
commit8c623fd1562666a7a35ed8ce8b06a7882d1b0459 (patch)
tree906030de59c8ca0cd3c9be34bdc352077c794f8e /17.0-rc/apache/config/redis.config.php
parentbaebdfefd931fca6799e2163d9ca3efe1520d4d3 (diff)
Run update.sh (#1170)
* Run update.sh Signed-off-by: tilosp-bot <git-bot@tilosp.de> * Run update.sh Signed-off-by: tilosp-bot <git-bot@tilosp.de> * Run update.sh Signed-off-by: tilosp-bot <git-bot@tilosp.de>
Diffstat (limited to '17.0-rc/apache/config/redis.config.php')
-rw-r--r--17.0-rc/apache/config/redis.config.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/17.0-rc/apache/config/redis.config.php b/17.0-rc/apache/config/redis.config.php
new file mode 100644
index 00000000..9429c901
--- /dev/null
+++ b/17.0-rc/apache/config/redis.config.php
@@ -0,0 +1,17 @@
+<?php
+if (getenv('REDIS_HOST')) {
+ $CONFIG = array (
+ 'memcache.distributed' => '\OC\Memcache\Redis',
+ 'memcache.locking' => '\OC\Memcache\Redis',
+ 'redis' => array(
+ 'host' => getenv('REDIS_HOST'),
+ 'password' => getenv('REDIS_HOST_PASSWORD'),
+ ),
+ );
+
+ if (getenv('REDIS_HOST_PORT') !== false) {
+ $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT');
+ } elseif (getenv('REDIS_HOST')[0] != '/') {
+ $CONFIG['redis']['port'] = 6379;
+ }
+}