Redis Manager
Manages the shared Redis Docker container for local dev environments.
Architecture
redis-manager/
├── docker-compose.yml # Redis 7 Alpine container
└── run.sh # lifecycle + data inspection CLI
Joins the shared nginx-proxy_net network (created by proxy-manager) so all app containers can connect via hostname codai_redis. Data is persisted in a named volume.
Commands
./run.sh start # start Redis container
./run.sh stop # stop container (data persists in volume)
./run.sh status # status + key count + memory usage
./run.sh wait # block until Redis responds PONG
./run.sh flush # FLUSHALL — clear all data (interactive confirm)
./run.sh flush-db <n> # FLUSHDB on database N (interactive confirm)
./run.sh list-keys [<pattern>]# KEYS <pattern> (default: *)
./run.sh cli # open redis-cli interactive session
How to Execute Tasks
Start Redis
cd redis-manager && ./run.sh start
Check status and memory usage
./run.sh status
Inspect keys for a specific instance
./run.sh list-keys "session:*"
./run.sh list-keys "cache:feature*"
Flush session data for testing
./run.sh flush-db 0 # flush default db only
Startup Order
proxy-manager start— creates the shared Docker networkmysql-manager start(orpostgres-manager start)redis-manager start
Configuration
| Variable | Default | Purpose |
|---|---|---|
REDIS_CONTAINER |
codai_redis |
Container name |
REDIS_PASSWORD |
redispass |
Redis AUTH password |
REDIS_PORT |
6380 |
Host port (maps to 6379) |
REDIS_MAXMEMORY |
256mb |
Max memory before eviction |
CODAI_NETWORK |
nginx-proxy_net |
Shared Docker network name |
App Connection
Backend containers connect to Redis at:
- Host:
codai_redis(container name on shared network) - Port:
6379 - Password:
redispass(orREDIS_PASSWORD)
Rules
flushalways prompts for confirmation — it deletes all data in all databases.flush-db <n>flushes exactly database N using a single-nconnection; confirm text always matches the database being flushed.stoppreserves data in the Docker volume. Usedocker compose down -vonly when you intentionally want to delete persisted data.- The container uses
restart: unless-stopped— it will resume after a Docker daemon restart. Run./run.sh stopwhen done. - The host port (
REDIS_PORT) is bound to127.0.0.1only. Set a non-defaultREDIS_PASSWORDon shared machines. - Redis connects to the
nginx-proxy_netnetwork asexternal: true— proxy-manager must start first.
Related Plugins
proxy-manager— creates the shared Docker network (start first)mysql-manager— relational DB companionpostgres-manager— relational DB companionworktree-manager— app instances that consume Redis
