Skip to content

fix(docker-compose - pwd.yml): prepend redis:// schema to REDIS_CACHE and REDIS_QUEUE #1621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

codefuturist
Copy link

@codefuturist codefuturist commented May 1, 2025

Previously, the docker-compose.yml defined the Redis connection endpoints as bare host:port (redis-cache:6379, redis-queue:6379). Many Redis client libraries expect a full URI (redis://host:port) and will either error out or fall back to defaults if the scheme is missing.

This change updates the two environment variables to include the redis:// prefix so that the connection strings are parsed correctly.

Explain the details for making this change. What existing problem does the pull request solve?

The application’s task queue and cache layers read connection URLs from REDIS_QUEUE and REDIS_CACHE. Without the URI scheme, clients were unable to parse the host and port properly, resulting in runtime connection failures. By explicitly adding redis:// in the compose file, we ensure:
1. Correct parsing of host and port by all Redis clients.
2. Avoidance of subtle errors that only manifest when the service is restarted or redeployed under Docker Swarm.

Fixes error message from "queue-short":

Please make sure that Redis Queue runs @ redis://. Redis reported error: Error 111 connecting to localhost:6379. Connection refused.

Previously the environment variables pointed to `redis-cache:6379` and `redis-queue:6379`.  
This change updates them to `redis://redis-cache:6379` and `redis://redis-queue:6379` for proper URI formatting.
@codefuturist codefuturist changed the title fix(docker-compose): prepend redis:// schema to REDIS_CACHE and REDIS_QUEUE fix(docker-compose - pwd.yml): prepend redis:// schema to REDIS_CACHE and REDIS_QUEUE May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant