Skip to content

Commit d15e338

Browse files
authored
docs: update README.md instructions (#41)
1 parent f152ca9 commit d15e338

File tree

1 file changed

+44
-26
lines changed

1 file changed

+44
-26
lines changed

README.md

Lines changed: 44 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,64 @@
1-
[![tests](https://github.com/ddev/ddev-redis/actions/workflows/tests.yml/badge.svg)](https://github.com/ddev/ddev-redis/actions/workflows/tests.yml) ![project is maintained](https://img.shields.io/maintenance/yes/2025.svg)
1+
[![add-on registry](https://img.shields.io/badge/DDEV-Add--on_Registry-blue)](https://addons.ddev.com)
2+
[![tests](https://github.com/ddev/ddev-redis/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/ddev/ddev-redis/actions/workflows/tests.yml?query=branch%3Amain)
3+
[![last commit](https://img.shields.io/github/last-commit/ddev/ddev-redis)](https://github.com/ddev/ddev-redis/commits)
4+
[![release](https://img.shields.io/github/v/release/ddev/ddev-redis)](https://github.com/ddev/ddev-redis/releases/latest)
25

3-
## What is this?
6+
## DDEV Redis
47

5-
This repository allows you to quickly install Redis into a [DDEV](https://ddev.readthedocs.io) project using the instructions below.
8+
## Overview
69

7-
## Installation
10+
[Redis](https://redis.io/) is an in-memory key–value database, used as a distributed cache and message broker, with optional durability.
11+
12+
This add-on integrates Redis into your [DDEV](https://ddev.com/) project with Redis persistence enabled by default.
813

9-
For DDEV v1.23.5 or above run
14+
## Installation
1015

11-
```sh
16+
```bash
1217
ddev add-on get ddev/ddev-redis
18+
ddev restart
1319
```
1420

15-
For earlier versions of DDEV run
21+
After installation, make sure to commit the `.ddev` directory to version control.
1622

17-
```sh
18-
ddev get ddev/ddev-redis
19-
```
23+
## Usage
2024

21-
Then restart your project
25+
| Command | Description |
26+
| ------- | ----------- |
27+
| `ddev redis-cli` | Run `redis-cli` inside the Redis container |
28+
| `ddev redis` | Alias for `ddev redis-cli` |
29+
| `ddev redis-flush` | Flush all cache inside the Redis container |
30+
| `ddev describe` | View service status and used ports for Redis |
31+
| `ddev logs -s redis` | Check Redis logs |
2232

23-
```sh
24-
ddev restart
25-
```
33+
Redis is available inside Docker containers with `redis:6379`.
34+
35+
## Redis Credentials
36+
37+
| Field | Value |
38+
|----------|-----------------------|
39+
| Username | `redis` |
40+
| Password | `` (empty by default) |
2641

27-
With DDEV v1.23.5+ you can choose a different Redis tag, the command below creates a `.ddev/.env.redis` file that you can commit:
42+
## Advanced Customization
2843

29-
1. `ddev dotenv set .ddev/.env.redis --redis-docker-image=redis:6`
30-
2. `ddev restart`
44+
To change the used Docker image:
3145

32-
## Explanation
46+
```bash
47+
ddev dotenv set .ddev/.env.redis --redis-docker-image=redis:7
48+
ddev add-on get ddev/ddev-redis
49+
ddev restart
50+
```
3351

34-
This Redis recipe for [DDEV](https://ddev.readthedocs.io) installs a [`.ddev/docker-compose.redis.yaml`](docker-compose.redis.yaml) using the `redis` Docker image.
52+
Make sure to commit the `.ddev/.env.redis` file to version control.
3553

36-
Persistence is disabled by default (see [redis.conf](./redis/redis.conf)), follow the config instructions to enable it, or switch to https://github.com/ddev/ddev-redis-7 where it is enabled by default.
54+
All customization options (use with caution):
3755

38-
## Interacting with Redis
56+
| Variable | Flag | Default |
57+
| -------- | ---- | ------- |
58+
| `REDIS_DOCKER_IMAGE` | `--redis-docker-image` | `redis:7` |
3959

40-
* The Redis instance will listen on TCP port 6379 (the Redis default).
41-
* Configure your application to access Redis on the host:port `redis:6379`.
42-
* To reach the Redis CLI interface, run `ddev redis-cli` to begin a session. You can also run Redis CLI commands directly on the command-line, e.g., `ddev redis-cli INFO`.
60+
## Credits
4361

44-
**Contributed and maintained 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)**
62+
**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)**
4563

46-
**Co-maintained by [@stasadev](https://github.com/stasadev)**
64+
**Maintained by the [DDEV team](https://ddev.com/support-ddev/)**

0 commit comments

Comments
 (0)