Skip to content

Latest commit

 

History

History
78 lines (52 loc) · 3.22 KB

README.md

File metadata and controls

78 lines (52 loc) · 3.22 KB

ddev-redis-7 - Redis 7 container for DDEV

GitHub release (with filter) Tests project is maintained

This repository provides Redis 7 container for DDEV.

It is based on redis:7.2-alpine docker image and DDEV custom compose files

Comparison to v6 (ddev/ddev-redis)

There are a lot of differences between v6 addon and this one

Feature ddev/ddev-redis ddev/ddev-redis-7
Maximum Memory Unlimited 512Mb
Persistence Optional Yes
Redis Version 6.x.y 7.2.x
Image Size ~40Mb ~11Mb
Anonymous Volumes No No
Optimized config No Yes

Anonymous volumes - Wait, what?

Official redis docker container mounts an anonymous volume on /data because... reasons. That volume is recreated on every restart. This one mounts the persistence directory on /data and names it according to the project name, and gives it a proper label. This way, each DDEV project has it's own data volume, and data can persist accordingly

Persistence?

Yes, persistence. This container is configured to persist data on /data volume. This means that if you stop the container, and start it again, the data will be there. This is useful for long-term caching of data, and for keeping the cache primed between ddev restarts.

Installation

For DDEV v1.23.5 or above run

ddev add-on get ddev/ddev-redis-7

For earlier versions of DDEV run

ddev get ddev/ddev-redis-7

Then restart your project

ddev restart

Important

Authentication is setup by default, and the password is redis.
If needed, you can auth with a username and password.
Username is redis as well.

Configuration

Redis configuration files are split in the .ddev/redis/conf folder, you can modify them as you wish.
Otherwise, plugin just works out of the box.

Commands

Addon exposes the following commands

Command Usage Description
redis ddev redis Launches the redis-cli
redis *COMMAND* ddev redis Run an arbitrary redis-cli command
redis-flush ddev redis-flush Clears all the Redis Databases

Based on the original ddev-contrib recipe
Developed and maintained by Oblak Studio