Connect to database and redis on a docker host using sockets

I have a multisite running in a container, connecting to remote “databases” server, with postgres and redis running over there. Now I want to move both of those to the host dockerised discourse runs on and connect to them using unix sockets. Any configuration hints how to give dockerised discourse access to the sockets exposed on host filesystem?

Mount the directories that the sockets are in (not the sockets themselves, because that causes Unpleasant Problems) as bind mounts inside the container, and then configure Discourse to talk to those sockets.

1 Like