Connect to Postgres remotely

(Paul Apostolos) #1

We are running the docker installation. Is there a way to configure the Postgres installation to allow for remote connections?

I think I would need to forward the appropriate ports from the host to the Docker container, then create a login for the Postgres server. But: 1. I don’t know how to get that sorted. And B. Would it persist between Discourse updates?

(Dan Porter) #2

It is possible, but slightly more complicated than I would like for a Discourse setup.

If you are utilizing the Postgres server for other systems (I’m guessing from what you are describing), would you consider using an externally hosted Postgres server? Amazon RDS and other providers, even home built, are fully compatible with Discourse’s docker based setup.

(Sam Saffron) #3

Its already listening on the postgres port. (that is how data container works)

Just add:

  - "5432:5432"


./launcher ssh container
sudo -u postgres psql postgres

create the user and password you need and log in using that user.

Data in the database is persisted on rebuilds, it is stored outside the container.

Linking a Discourse User db with a Mumble server (Murmur)
(Paul Apostolos) #4

I can’t get the

Part working. I think it has something to do with the root user. I tried switching to the discourse user, but it asked me for a password (that I don’t have).

I tried adding the user several times with different parameters…No difference. It never shows up in the list.

(Sam Saffron) #5

hmmm, why are you not using the create user command ?

(Paul Apostolos) #6

I tried that first…When it didn’t work, I looked online and tried this way.

(Paul Apostolos) #7

I didn’t see that you need to add a semicolon to the end of the line.

Now, I’m that guy. The guy that spends three hours to find a missing semicolon.