summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarceljd <support@dihosting.ch>2019-01-11 08:56:57 +0000
committermarceljd <support@dihosting.ch>2019-01-27 13:46:25 +0000
commitba4c1359b96a34f9945e5541232223a7ab1a6ce0 (patch)
tree9b96698ec50835b7a7961f306b4964099e371d30
parent250802c70679b72457e1b85f301e1a503517f780 (diff)
set redis environment variables
Signed-off-by: marceljd <support@dihosting.ch>
-rw-r--r--.config/redis.config.php12
-rw-r--r--README.md4
2 files changed, 16 insertions, 0 deletions
diff --git a/.config/redis.config.php b/.config/redis.config.php
new file mode 100644
index 00000000..d300dd0a
--- /dev/null
+++ b/.config/redis.config.php
@@ -0,0 +1,12 @@
+<?php
+if (getenv('REDIS_HOST')) {
+ $CONFIG = array (
+ 'memcache.distributed' => '\OC\Memcache\Redis',
+ 'memcache.locking' => '\OC\Memcache\Redis',
+ 'redis' => array(
+ 'host' => getenv('REDIS_HOST'),
+ 'port' => getenv('REDIS_PORT') ?: 6379,
+ ),
+ );
+}
+
diff --git a/README.md b/README.md
index 8e4c168d..06189890 100644
--- a/README.md
+++ b/README.md
@@ -130,6 +130,10 @@ The install and update script is only triggered when a default command is used (
- `NEXTCLOUD_UPDATE` (default: _0_)
+If you want to use Redis you have to create a seperate [Redis](https://hub.docker.com/_/redis/) container in your setup / in your docker-compose file. To inform Nextcloud about the Redis container add:
+
+- 'REDIS_HOST' (not set by default) Name of Redis container
+- 'REDIS_PORT' (optional, default:_6379_) Port number of Redis container. Use only if you use a non-standard port.
# Running this image with docker-compose