fix(docker-compose - pwd.yml): prepend redis:// schema to REDIS_CACHE and REDIS_QUEUE #1621
+2
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.