diff options
author | GitHub Workflow <workflow@github.com> | 2020-12-04 01:07:14 +0000 |
---|---|---|
committer | GitHub Workflow <workflow@github.com> | 2020-12-04 01:07:14 +0000 |
commit | 4c40d26223121e3b17c9a1c5b28c40c3ee6c8856 (patch) | |
tree | 30d1104686e6ba245e8b26ddd16e471086fb45f7 /18.0-rc/fpm/config/redis.config.php | |
parent | c292b9b2f2d6f0c1581532d6a95e319961930928 (diff) |
Runs update.sh
Diffstat (limited to '18.0-rc/fpm/config/redis.config.php')
-rw-r--r-- | 18.0-rc/fpm/config/redis.config.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/18.0-rc/fpm/config/redis.config.php b/18.0-rc/fpm/config/redis.config.php new file mode 100644 index 00000000..a5fde3c7 --- /dev/null +++ b/18.0-rc/fpm/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; + } +} |