summaryrefslogtreecommitdiffstats
path: root/18.0-rc/apache/config/redis.config.php
diff options
context:
space:
mode:
authorGitHub Workflow <workflow@github.com>2020-11-13 00:50:32 +0000
committerGitHub Workflow <workflow@github.com>2020-11-13 00:50:32 +0000
commit2b75fba733161e901ddd3f9d02c4f1b0f2158a8e (patch)
treeb324f70515b5a97e9a9dde20ba9c77b34a1b4bb6 /18.0-rc/apache/config/redis.config.php
parent65634abac63693c073d85842e0585c6b94be2c48 (diff)
Runs update.sh
Diffstat (limited to '18.0-rc/apache/config/redis.config.php')
-rw-r--r--18.0-rc/apache/config/redis.config.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/18.0-rc/apache/config/redis.config.php b/18.0-rc/apache/config/redis.config.php
new file mode 100644
index 00000000..a5fde3c7
--- /dev/null
+++ b/18.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' => (string) 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;
+ }
+}