Hi all. I have a fresh 2.4.5 install, not upgrade. When I try to run any database-interacting Rake command, I get this error:
PG::ConnectionBad: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Googling, it looks like that most often means that PostgreSQL itself has fallen over and needs to be restarted. That’s not the case here, however; PostgreSQL is running on a separate container, and I can connect to it manually over the network just fine.
Of note, it’s trying to connect over a local socket. However, config/discourse.conf specifically lists a PostgreSQL instance to connect to by host and port, with username/password. (The same credentials I use to connect manually.)
That to me suggests that… discourse.conf is just not being read at all? So it’s falling back to a localhost connection over unix socket, which of course doesn’t work because there is no local db? That’s my best guess, but I don’t know if it’s right or how to fix it if it is.
No, this isn’t a Docker environment. (Different host.) It’s a git clone of the tag, plus some edits such as adding the DB credentials and setting force_https to true.
@pfaffman There is no web.socketed.template.yml file found.
The confusing thing is, I had this working earlier, or at least this part of it. Then I moved it to a subdirectory (and updated the webserver config to point to it) and now it wont’ talk to the database. How one impacts the other I do not understand.
(Technically this is a build process for another host that doesn’t use Docker. I’m trying to setup a one-click install template of Discourse, and it’s… proving difficult.)