This repo provides a turn-key Redis setup for local development and QA, with support for:
- Redis 8.2.0 in Docker
- RedisInsight GUI for exploration and monitoring
- Secure password authentication
- Reset, backup, and restore scripts
- Portable structure: ready to be reused in any new project
.
├── .env
├── .gitignore
├── .dockerignore
├── docker-compose.yml
├── redis/
│ └── redis.conf
├── scripts/
│ ├── backup-redis.sh
│ ├── reset-redis.sh
│ └── restore-redis.sh
└── backups/
└── .gitkeep
git clone https://github.com/yourname/redis-boilerplate.git
cd redis-boilerplate
cp .env.example .env
docker compose build --no-cache redis
docker compose up -d
Connect via CLI directly inside the container:
docker exec -it redis-dev redis-cli -a change_me_redis_pw
Connect via RedisInsight
http://localhost:5540
docker ps --format "table {{.Names}}\t{{.Ports}}"
Add a new database connection:
Host: redis-dev (or localhost)
Port: 6379
Password: change_me_redis_pw
Stops, removes, and rebuilds Redis with a clean state.
./scripts/reset-redis.sh
Forces Redis to persist to disk and copies dump.rdb into ./backups/.
./scripts/backup-redis.sh
Example output:
backups/dump-20250816_173045.rdb
Restores from a previous backup.
./scripts/restore-redis.sh ./backups/dump-20250816_173045.rdb