-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented redis persistence #18
Conversation
Uses Semantic release flow
BREAKING CHANGE: Docker image has been changed BREAKING CHANGE: Redis now has username and password BREAKING CHANGE: Redis data has a separate volume
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes implemented
Fixed the image size Co-authored-by: Stanislav Zhuk <[email protected]>
Fixed formatting Co-authored-by: Stanislav Zhuk <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mkdir test-ddev-project && cd test-ddev-project && ddev config --auto --omit-containers=db && git clone https://github.com/oblakstudio/ddev-redis && ddev get ddev-redis
Installing project-level components:
Unable to expand files and directories: stat commands/redis/redis-cli: no such file or directory
https://github.com/oblakstudio/ddev-redis-7 Wrong repo my man :) Edit: My bad, I didn't change the name in the install.yaml. Fixed |
You forgot about And asking about this one again, the question does not go away if you resolve the conversation: What if someone just wants to use 6 or 7-bookworm tag, let's give them this ability: |
I've applied your commit in the convo. Let me repush if it wasn't changed. |
Yes, please push, there was no change for the image.
Isn't that the same thing? |
Pushed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the working directory should be changed from /data
to something else.
Because there is an error:
$ ddev redis KEYS '*'
+ redis-cli -p 6379 -h redis -a redis --no-auth-warning KEYS appendonly.aof test-ddev-project.rdb
(error) ERR wrong number of arguments for 'keys' command
$ ddev exec -s redis "pwd && ls"
/data
appendonly.aof test-ddev-project.rdb
In the regular ddev-redis /data
is empty and the command is working:
$ ddev redis-cli KEYS '*'
(empty array)
## Description: Run redis-cli inside the redis container | ||
## Usage: redis-flush | ||
## Example: "redis-flush" | ||
|
||
redis-cli -a redis --no-auth-warning FLUSHALL ASYNC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Description: Run redis-cli inside the redis container | |
## Usage: redis-flush | |
## Example: "redis-flush" | |
redis-cli -a redis --no-auth-warning FLUSHALL ASYNC | |
## Description: Clear all Redis databases | |
## Usage: redis-flush | |
## Example: "ddev redis-flush" | |
set -x | |
redis-cli -a redis --no-auth-warning FLUSHALL ASYNC |
Fixed the command description and example.
Redis commands are so complicated, let's add set -x
to see what is actually executing.
## Description: Run redis-cli inside the redis container | ||
## Usage: redis [flags] [args] | ||
## Example: "redis KEYS *" or "ddev redis-cli INFO" or "ddev redis-cli --version" | ||
|
||
redis-cli -p 6379 -h redis -a redis --no-auth-warning "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Description: Run redis-cli inside the redis container | |
## Usage: redis [flags] [args] | |
## Example: "redis KEYS *" or "ddev redis-cli INFO" or "ddev redis-cli --version" | |
redis-cli -p 6379 -h redis -a redis --no-auth-warning "$@" | |
## Description: Run redis-cli inside the redis container | |
## Usage: redis [flags] [args] | |
## Example: ddev redis KEYS "'*'" or "ddev redis INFO" or "ddev redis --version" | |
set -x | |
redis-cli -p 6379 -h redis -a redis --no-auth-warning "$@" |
Fixed the command examples.
Quotes around '*'
- because it is expanded when running from zsh.
Redis commands are so complicated, let's add set -x
to see what is actually executing.
Sorry didn't understand this. Workdir should be data, datadir should be /data. Where is the issue?
Why are you adding these two flags after KEYS command? |
I didn't add anything, I tested it again, and What I meant is For example, if you add two folders in the project
Note that I run only After this, when you run the command again with escaped
And looks like it works. But when you run
The only way I found how to prevent expansion, is to escape
I updated the example. |
Since we mutually decided to split the plugins. I'm closing this PR |
The Issue
#1
How This PR Solves The Issue
Implements an environment variable to specify redis version
Implements additional changes as discussed in the issue and on the Discord server
Automated Testing Overview
Just run the bats test
Release/Deployment Notes
PR merge will automatically trigger a semantic release process on the main branch and release version 2.0