diff options
author | GitHub Workflow <workflow@github.com> | 2021-07-06 17:51:01 +0000 |
---|---|---|
committer | GitHub Workflow <workflow@github.com> | 2021-07-06 17:51:01 +0000 |
commit | b6b9499252cd572f3bb903f2cb04d36ea880573f (patch) | |
tree | 04c76c07d8850cf48effe7b08ab33f5573e13ef9 /22.0/fpm/config/redis.config.php | |
parent | 9c6af73a768dbe48fd0cfa9434ff46042b9573d3 (diff) |
Runs update.sh
Diffstat (limited to '22.0/fpm/config/redis.config.php')
-rw-r--r-- | 22.0/fpm/config/redis.config.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/22.0/fpm/config/redis.config.php b/22.0/fpm/config/redis.config.php new file mode 100644 index 00000000..a5fde3c7 --- /dev/null +++ b/22.0/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; + } +} |