nextcloud / nextcloud/docker

Obscure way to use unix socket for Redis

Open
#1,785 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug feature: auto config (environment variables) integration: memcache needs review upstream
Dominant language
Shell
Stars
7.4k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

The parameter passing causes problems from the Docker container environment all the way to the phpredis->pconnect when using unix socket. The phpredis is kind of requiring the port setting to -1 if the host is actually a unix socket path starting with '/'. However in this image, the entrypoint.sh defaults REDIS_HOST_PORT to 6379, which would eventually passing into phpredis.

This would work though:

environment:
      REDIS_HOST: /tmp/redis.sock
      REDIS_HOST_PORT: -1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting entrypoint.sh and how REDIS_HOST and REDIS_HOST_PORT are passed into the container environment. Reproduce the Unix-socket configuration with /tmp/redis.sock and port -1, then compare it with the default port behavior. Done means the documented socket setup works without an obscure manual workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, redis, shell
Domain
databases, devops, infrastructure
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.