feat(infra): support REDIS_URL connection string and TLS for cloud Redis
Summary
Adds first-class support for REDIS_URL connection strings and TLS/SSL encryption (rediss://), enabling seamless integration with cloud-hosted Redis providers such as Upstash and Render Key Value.
Key Changes
-
Environment Configuration (
env.config.ts):- Added auto-parsing for
REDIS_URLto automatically extract hostname, port, and password credentials while retaining backward compatibility with standaloneREDIS_HOST,REDIS_PORT, andREDIS_PASSWORDvariables.
- Added auto-parsing for
-
Cache Service (
cache.service.ts):- Enhanced Redis initialization to directly connect via connection string URL, automatically enabling TLS when
rediss://protocol is provided. - Maintained in-memory fallback mechanism when Redis is unavailable or disabled.
- Enhanced Redis initialization to directly connect via connection string URL, automatically enabling TLS when
-
Webhook Queue (
webhook-queue.service.ts):- Added conditional TLS configuration (
tls: {}) for BullMQ queue connections when connecting to secured Redis endpoints.
- Added conditional TLS configuration (
-
Documentation & Examples:
- Updated
.env.exampleto documentREDIS_URLusage.
- Updated