Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: minor improvments to redis documentation #3185

Merged
merged 1 commit into from
Jun 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions docs/docker-images/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
| :------------------- | :---------- | :---------------------------------------------------------------------------------------- |
Expand All @@ -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\).
Expand Down