generated from ddev/ddev-addon-template
-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from oblakstudio/feat/tweaks
feat: Additional work and tweaks
- Loading branch information
Showing
12 changed files
with
105 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,67 @@ | ||
[![tests](https://github.com/oblakstudio/ddev-redis-7/actions/workflows/tests.yml/badge.svg)](https://github.com/oblakstudio/ddev-redis-7/actions/workflows/tests.yml) ![project is maintained](https://img.shields.io/maintenance/yes/2023.svg) | ||
<div align="center"> | ||
|
||
## What is this? | ||
# ddev-redis-7 - Redis 7 container for DDEV | ||
|
||
This repository allows you to quickly install redis into a [Ddev](https://ddev.readthedocs.io) project using just `ddev get oblakstudio/ddev-redis-7`. | ||
![GitHub release (with filter)](https://img.shields.io/github/v/release/oblakstudio/ddev-redis-7) | ||
[![Bleeding edge tests](https://github.com/oblakstudio/ddev-redis-7/actions/workflows/test_bleeding_edge.yml/badge.svg)](https://github.com/oblakstudio/ddev-redis-7/actions/workflows/test_bleeding_edge.yml) | ||
[![E2E Tests](https://github.com/oblakstudio/ddev-redis-7/actions/workflows/test_stable.yml/badge.svg?event=push)](https://github.com/oblakstudio/ddev-redis-7/actions/workflows/tests.yml) | ||
![project is maintained](https://img.shields.io/maintenance/yes/2024.svg) | ||
|
||
</div> | ||
|
||
This repository provides [Redis 7](https://redis.com) container for [DDEV](https://ddev.readthedocs.io/). | ||
|
||
It is based on [redis:7.0.12-alpine](https://hub.docker.com/layers/library/redis/7.0.12-alpine/images/sha256-336ff85d67e89689913130cd7334d5eb67783d0e94362c6ce76314161aa1f0fd?context=explore) docker image and [DDEV custom compose files](https://ddev.readthedocs.io/en/stable/users/extend/custom-compose-files/) | ||
|
||
## Comparison to official addon | ||
|
||
There are a lot of differences between [official](https://github.com/ddev/ddev-redis) addon and this one | ||
|
||
| Feature | ddev/ddev-redis | oblakstudio/ddev-redis-7 | | ||
|-------------------|------------------|--------------------------| | ||
| Maximum Memory | Unlimited | 512Mb | | ||
| Persistence | No | **Yes** | | ||
| Redis Version | 6.2.5 | 7.0.12 | | ||
| Image Size | 39.9Mb | 10.34Mb | | ||
| ARM Support | v7 | v8 | | ||
| Anonymous Volumes | On every restart | **NO** | | ||
| Optimized config | No | **Yes** | | ||
|
||
### Anonymous volumes - Wait, what? | ||
|
||
Official redis docker image mounts an anonymous volume on `/data` because... reasons. That volume is recreated on every restart. This one mounts the persistance 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 | ||
|
||
### Persistance? | ||
|
||
Yes, persistance. This image 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 | ||
|
||
1. `ddev get oblakstudio/ddev-redis-7` | ||
2. `ddev restart` | ||
``` | ||
$ ddev get oblakstudio/ddev-redis-7 | ||
$ ddev restart | ||
``` | ||
|
||
>**Note:** Authentication is setup by default, and the password is `redis`. For latest AUTH support, username is also set to `redis`. | ||
|
||
## 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. | ||
|
||
## Explanation | ||
## Commands | ||
|
||
<!-- 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. --> | ||
## Commands | ||
|
||
## Interacting with Redis | ||
Addon exposes the following commands | ||
|
||
* The Redis instance will listen on TCP port 6379 (the redis default). | ||
* Configure your application to access redis on the host:port `redis:6379`. | ||
* Authentication is setup by default, and the password is `redis`. For latest AUTH support, username is also set to `redis`. | ||
* 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`. | ||
| 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 | | ||
___ | ||
|
||
**Contributed and maintained by [@seebeen](https://github.com/seebeen) based on the original [ddev-contrib recipe](https://github.com/drud/ddev-contrib/tree/master/docker-compose-services/redis) by [@gormus](https://github.com/gormus)** | ||
**Based on the original [ddev-contrib recipe](https://github.com/ddev/ddev-contrib/tree/master/docker-compose-services/mongodb)** | ||
**Developed and maintained by [Oblak Studio](https://github.com/oblakstudio)** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
#ddev-generated | ||
## Description: Run redis-cli inside the redis container | ||
## Usage: redis-flush | ||
## Example: "redis-flush" | ||
|
||
redis-cli -a redis --no-auth-warning FLUSHALL ASYNC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters