feat(infra): add Redis service and client for Phase 0 [FASE-0.1]

Add Redis 7 to Docker Compose with healthcheck and persistence, separate logical DBs for blacklist and cache, singleton redis client helpers, and unit tests with fakeredis.
This commit is contained in:
2026-05-18 13:18:45 +02:00
parent 821c4ac5ec
commit 9b70655b7e
6 changed files with 118 additions and 17 deletions

View File

@@ -24,6 +24,9 @@ class Settings(BaseSettings):
# ── Redis ─────────────────────────────────────────────────────────
REDIS_URL: str = "redis://redis:6379/0"
# Logical DB indices on the same Redis instance (PATH in URL is overridden).
REDIS_TOKEN_BLACKLIST_DB: int = 1
REDIS_CACHE_DB: int = 2
# ── CORS ─────────────────────────────────────────────────────────
# Comma-separated list of allowed origins, or a JSON array.