summaryrefslogtreecommitdiffstats
path: root/20.0/apache/config/redis.config.php
diff options
context:
space:
mode:
authorGitHub Workflow <workflow@github.com>2020-10-03 08:59:35 +0000
committerGitHub Workflow <workflow@github.com>2020-10-03 08:59:35 +0000
commit2161012fb80fd24ad85bcdf62d2dd77af1465333 (patch)
treedf835f4f66c5fe73f645ee8dc9d05e7a0b71662e /20.0/apache/config/redis.config.php
parentcd8807c0a8d28f583990da6fda51f663a25d27df (diff)
Runs update.sh
Diffstat (limited to '20.0/apache/config/redis.config.php')
-rw-r--r--20.0/apache/config/redis.config.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/20.0/apache/config/redis.config.php b/20.0/apache/config/redis.config.php
new file mode 100644
index 00000000..9429c901
--- /dev/null
+++ b/20.0/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;
+ }
+}