Discourse Container with UnixSocket for Redis?

PR for this:

https://github.com/discourse/discourse_docker/pull/469

Note:

To implement:

  • Change the redis template in the container yml file
  • Add one additional line to the same container yml file
 ## Set the REDIS_URL and use the redis.socketed.template.yml to use 
 ## a unix domain socket for Redis
 REDIS_URL: unix:///shared/tmp/redis.sock

Implementation Notes:

  1. If concerned about security of the Redis DB on the host, no need to expose this unix socket in the shared volume.

  2. If you wish to set the permissions of the unix socket to 770 (instead of 777) , change the group of the unix socket to www-data.

4 Likes