Guarantee REDIS_HOST_PORT is never null for UNIX sockets #1968
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.
Addresses #1785 (which arises when using UNIX sockets)
Without this fix, UNIX socket connections won't work if REDIS_HOST is used to specify the socket to the container unless an additional bogus REDIS_HOST_PORT is also specified.
This change makes the auto-generated REDIS socket configuration in the Docker container (which overrides whatever is specified in config.php whenver REDIS_HOST is used) match NC's recommended default (which includes specifying port 0 for sockets). More importantly it's more user friendly and eliminates non-working setups with error messages such as the following (which results in an Internal Server Error):
P.S. I believe this is the only file in the docker repository that needs to be updated manually - my reading is that update.sh is used as part of the release process and will update the ones for each version/config model appropriately. If I'm incorrect let me know and I'll update those too. Should all be the same.