I have Redis running in docker compose:
version: '3'
services:
redis:
image: redis:7
container_name: my-redis
command: redis-server --requirepass ${REDIS_PASSWORD:-REDIS_PASSWORD}
volumes:
- ./redis-data:/data
ports:
- '6379:6379'
My .env file has REDIS_PASSWORD:redis_password
I have an api that creates a record, no errors, but I cannot find the record using redis-cli.
I've tried redis-cli -a redis_password and redis-cli then 'auth redis_password`.
When I run SCAN 0 or anything I don't see any records at all. Where are they being stored? I have no idea the data can be there but I can't access it from the command line.
By default
rediscontains 16 separatedDBif you don't specify one when you push your data into redisKeythen the database0is used by default First connect to CLI using this command linethen enter the CMD
to show all keys in the DB if their is no data you will receive
(empty array)as message