Does discourse launcher / docker use the local postgresql and redis servers?

AI-generated summary

The discussion revolves around whether the Discourse launcher uses local PostgreSQL and Redis servers when installed via Docker. dalu74 wondered if the launcher uses the host’s installations or creates its own containers. hello-smile6 clarified that the launcher runs its own PostgreSQL and Redis inside the main Docker container, making host installations unnecessary.

dalu74 then inquired about configuring the Discourse container to use the host’s PostgreSQL and Redis, but hello-smile6 advised against this, citing potential version compatibility issues with future upgrades.

Today I installed discourse on a new host, via docker, more or less via this thread:

The pre-install document says that Postgresql13+ Ruby 3.2+ and Redis 7 should be installed.
Or actually is just says “Software requirements”.

I do have pg16 running and I installed Redis 7 via snap on Rocky 9.
I essentially copies the samples/standalone.yml and edited it, added mail server settings and minor changes.

When I docker ps or docker ps -a I see but 1 container running, the local discourse container.

It might sound like a dumb question, but does the launcher use a pg container and a redis container or are they using the host’s pg and redis installations?

It runs its own postgres/redis inside the main Docker container. I don’t think you actually need Postgres, Ruby, or Redis installed on the host, but I may be incorrect.

Thank you.

Then the natural next question is, “how do I make it use the host’s pg & redis”.

I know I can make pg and redis listen on the docker0 interface, but I’m also guessing there must be some kind of way to configure the discourse container to use this docker0 ip addr as the pg & redis ip.

I’m having a hard time finding “that one place” for all documentation.
Maybe I should start a new topic? And where?

Is there a specific reason for making it use the host’s postgres? Discourse should manage postgres upgrades on its own by default, so you might end up with an incompatible postgres version eventually if you are using the host’s postgres.