From 95605b22a379007e43d6b0ff29d3e57589b4f51f Mon Sep 17 00:00:00 2001 From: Scott Leggett Date: Mon, 13 Jun 2022 20:22:56 +0800 Subject: [PATCH] chore: minor improvments to redis documentation --- docs/docker-images/redis.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/docker-images/redis.md b/docs/docker-images/redis.md index 052753639a..bd9543eb7f 100644 --- a/docs/docker-images/redis.md +++ b/docs/docker-images/redis.md @@ -28,15 +28,15 @@ We don't typically suggest using a persistent redis for in-memory cache scenario This image is prepared to be used on Lagoon. There are therefore some things already done: * Folder permissions are automatically adapted with [`fix-permissions`](https://github.com/uselagoon/lagoon-images/blob/main/images/commons/fix-permissions)so this image will work with a random user. -* The files within `/etc/redis/*` are parsed through [`envplate`](https://github.com/kreuzwerker/envplate)with a container-entrypoint. +* The files within `/etc/redis/*` are templated using [`envplate`](https://github.com/kreuzwerker/envplate) via a container-entrypoint. ## Included `redis.conf` configuration file -The image ships a _default_ Redis configuration file, optimized to work on Lagoon. Some options are configurable via environment variables \(see [Environment Variables](../using-lagoon-advanced/environment-variables.md)\). +The image ships a _default_ Redis configuration file, optimized to work on Lagoon. -## Environment Variables +### Environment Variables -Environment variables to change redis' options can be defined in the Redis base image. See also [https://raw.githubusercontent.com/antirez/redis/4.0/redis.conf](https://raw.githubusercontent.com/antirez/redis/4.0/redis.conf) for further config. +Some options in this default configuration are configurable via [runtime environment variables](../using-lagoon-advanced/environment-variables.md#runtime-environment-variables-lagoon-api). | Environment Variable | Default | Description | | :------------------- | :---------- | :---------------------------------------------------------------------------------------- | @@ -46,6 +46,11 @@ Environment variables to change redis' options can be defined in the Redis base | `MAXMEMORYPOLICY` | allkeys-lru | The policy to use when evicting keys if redis reaches its maximum memory usage | | `REDIS_PASSWORD` | disabled | Enables [authentication feature](https://redis.io/topics/security#authentication-feature) | +## Custom configuration + +By building on the base image you can include custom configuration. +See [https://raw.githubusercontent.com/antirez/redis/4.0/redis.conf](https://raw.githubusercontent.com/antirez/redis/4.0/redis.conf) for full documentation of the redis configuration file. + ## Redis-persistent Based on the [Lagoon `redis` image](https://github.com/uselagoon/lagoon-images/blob/main/images/redis/5.Dockerfile), the [Lagoon `redis-persistent` Docker image](https://github.com/uselagoon/lagoon-images/blob/main/images/redis-persistent/5.Dockerfile) is intended for use when the Redis service must be utilized in `persistent` mode \(ie. with a persistent volume where keys will be saved to disk\).