Skip to content

Commit 927e85b

Browse files
stasadevseebeen
andauthored
feat: add optimized config from ddev/ddev-redis-7 (#34)
Co-authored-by: Sibin Grasic <sibin.grasic@oblak.studio>
1 parent d15e338 commit 927e85b

File tree

12 files changed

+1083
-0
lines changed

12 files changed

+1083
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55

66
## DDEV Redis
77

8+
> [!NOTE]
9+
> This add-on has absorbed functionality from `ddev/ddev-redis-7`, see [Advanced Customization](#advanced-customization).
10+
811
## Overview
912

1013
[Redis](https://redis.io/) is an in-memory key–value database, used as a distributed cache and message broker, with optional durability.
@@ -41,6 +44,16 @@ Redis is available inside Docker containers with `redis:6379`.
4144

4245
## Advanced Customization
4346

47+
To apply an optimized configuration from `ddev/ddev-redis-7`:
48+
49+
```bash
50+
ddev dotenv set .ddev/.env.redis --redis-optimized=true
51+
ddev add-on get ddev/ddev-redis
52+
ddev restart
53+
```
54+
55+
Make sure to commit the `.ddev/.env.redis` file to version control.
56+
4457
To change the used Docker image:
4558

4659
```bash
@@ -56,9 +69,12 @@ All customization options (use with caution):
5669
| Variable | Flag | Default |
5770
| -------- | ---- | ------- |
5871
| `REDIS_DOCKER_IMAGE` | `--redis-docker-image` | `redis:7` |
72+
| `REDIS_OPTIMIZED` | `--redis-optimized` | `false` (`true`/`false`) |
5973

6074
## Credits
6175

6276
**Contributed by [@hussainweb](https://github.com/hussainweb) based on the original [ddev-contrib recipe](https://github.com/ddev/ddev-contrib/tree/master/docker-compose-services/redis) by [@gormus](https://github.com/gormus)**
6377

78+
**Optimized config from `ddev/ddev-redis-7` conributed by [@seebeen](https://github.com/seebeen)**
79+
6480
**Maintained by the [DDEV team](https://ddev.com/support-ddev/)**

install.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@ project_files:
44
- docker-compose.redis.yaml
55
- redis/scripts/settings.ddev.redis.php
66
- redis/scripts/setup-drupal-settings.sh
7+
- redis/scripts/setup-redis-optimized-config.sh
78
- redis/redis.conf
9+
- redis/advanced.conf
10+
- redis/append.conf
11+
- redis/general.conf
12+
- redis/io.conf
13+
- redis/memory.conf
14+
- redis/network.conf
15+
- redis/security.conf
16+
- redis/snapshots.conf
817
- commands/redis/redis-cli
918
- commands/redis/redis-flush
1019

@@ -14,6 +23,12 @@ post_install_actions:
1423
- |
1524
#ddev-description:Install redis settings for Drupal 9+ if applicable
1625
redis/scripts/setup-drupal-settings.sh
26+
- |
27+
#ddev-description:Using optimized config if --redis-optimized=true
28+
redis/scripts/setup-redis-optimized-config.sh
29+
- |
30+
#ddev-description:Remove redis/scripts if there are no files
31+
rmdir redis/scripts 2>/dev/null || true
1732
1833
removal_actions:
1934
- |

0 commit comments

Comments
 (0)