redis-dockerizer is a modular suite of Redis-powered Spring Boot projects, each showcasing a different integration pattern with Docker. It can serve as both an educational playground and a starter template for real-world systems that need speed, scalability, and simplicity.
This repository currently includes four self-contained modules:
- Pub/Sub — real-time messaging with channel fan-out
- Caching — application-level caching for CRUD workloads
- Key Management — login, validation, extension, and logout using Redis-backed sessions
- Session Management (Presence) — online/offline tracking with TTL and session statistics
Each module includes a Spring Boot application, Docker Compose configuration for Redis, and sample REST endpoints.
-
Clone the repository
git clone https://github.com/MenekseYuncu/redis-dockerizer.git cd redis-dockerizer
-
Choose a module (e.g.,
pubsub
,caching
,key-management
, orsession-management
), then run:cd <module> docker-compose up -d # start Redis ./mvnw spring-boot:run # run the Spring Boot app
-
Test the APIs using cURL or Postman (see each module’s README for endpoints).
-
Customize TTLs, cache names, key strategies, and security settings as needed.
Requirements: Java 21+, Maven 3.6+, Docker & Docker Compose
Module | Purpose | Highlights |
---|---|---|
pubsub/ | Real-time messaging via Redis Pub/Sub | Channel-based publish/subscribe, REST publishers, logging & metrics subscribers |
caching/ | Redis as a caching layer for CRUD | @Cacheable / @CachePut / @CacheEvict , TTL, UUID Product API |
key-management/ | Session keys & login lifecycle | Login, validate, extend, logout, terminate-all, client IP capture |
session-management/ | User presence (online/offline) | Presence APIs, TTL refresh, session stats, user removal |
redis-dockerizer/
├── caching/
├── key-management/
├── pubsub/
├── session-management/
└── README.md
A complete Postman collection is available to test all modules’ APIs out of the box:
- Open Postman
- Import the collection using this link: 👉 Redis-Dockerizer Postman Collection
- Set the
baseUrl
variable according to the module you are running (e.g.,http://localhost:8082
,http://localhost:8083
, etc.) - Explore endpoints grouped by module (Pub/Sub, Caching, Key Management, Session Management).
- (TR) Medium: Redis ve Spring Boot: Modern Uygulamalarda Performans ve Ölçeklenebilirlik Rehberi — a comprehensive guide covering all modules. 👉 Read the article
- Fork the repository
- Create a branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m "Add amazing feature"
) - Push the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Thanks to everyone who has contributed to this repository.
Built with Spring Boot, Spring Data Redis, and Docker.