Skip to content

Commit

Permalink
feat: Moved to standard redis docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
seebeen committed Sep 16, 2023
1 parent f0efed3 commit 57db198
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 75 deletions.
23 changes: 0 additions & 23 deletions .redisimageBuild/Dockerfile

This file was deleted.

21 changes: 0 additions & 21 deletions .redisimageBuild/docker-entrypoint.sh

This file was deleted.

19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ There are a lot of differences between [official](https://github.com/ddev/ddev-r
| ----------------- | ---------------- | ------------------------ |
| Maximum Memory | Unlimited | 512Mb |
| Persistence | No | **Yes** |
| Redis Version | 6.2.5 | 7.0.12 |
| Image Size | 112.9Mb | 23.51Mb |
| ARM Support | v7 | v8 |
| Redis Version | 6.2.5 | 7.x |
| Image Size | 112.9Mb | 14.38Mb |
| Anonymous Volumes | On every restart | **NO** |
| Optimized config | No | **Yes** |

Expand All @@ -43,15 +42,25 @@ $ 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`.
> [!IMPORTANT]
> Authentication is setup by default, and the password is `redis`.
> You can use the password with or without a username. Username is `redis` as well.

## Configuration

### Redis Configuration

### Redis Version
You can change the redis version by defining an environment variable using an `.env` file in the .ddev folder, or by exporting it in your shell.

```bash
export DDEV_REDIS_VERSION="7.2"
```

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

## Commands

Expand Down
30 changes: 10 additions & 20 deletions docker-compose.redis.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,19 @@
#ddev-generated
services:
volumes:
redis:
container_name: ddev-${DDEV_SITENAME}-redis
build:
args:
BASE_IMAGE: redis:7.0.12-alpine
context: ".redisimageBuild"
dockerfile: Dockerfile
name: ddev-${DDEV_SITENAME}-redis
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: $DDEV_APPROOT

services:
redis:
container_name: ddev-${DDEV_SITENAME}-redis
image: redis:${DDEV_REDIS_VERSION:-7}-alpine
command: /etc/redis/conf/redis.conf
volumes:
- type: "volume"
source: redis
target: "/data"
volume:
nocopy: true
- ".:/mnt/ddev_config"
- "./redis:/etc/redis/conf"
command:
- redis-server
- /etc/redis/conf/redis.conf

volumes:
redis:
name: ddev-${DDEV_SITENAME}-redis
- "redis:/data"
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: $DDEV_APPROOT
6 changes: 0 additions & 6 deletions install.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: redis

pre_install_actions:

project_files:
- .redisimageBuild/docker-entrypoint.sh
- .redisimageBuild/Dockerfile
- commands/redis/redis
- commands/redis/redis-flush
- redis/redis.conf
Expand All @@ -18,8 +14,6 @@ project_files:
- redis/snapshots.conf
- docker-compose.redis.yaml

global_files:

post_install_actions:
- |
#ddev-description: Change the redis dump filename
Expand Down

0 comments on commit 57db198

Please sign in to comment.