Docker install mac, fails to update app.yml

I’ve just found the answer in the following post

You need to do this:

  • Enter the container.
  • su - postgres
  • psql -d postgres -c "ALTER USER postgres WITH PASSWORD '<new password>';"

By default, PostgreSQL uses peer authentication for local connections. It uses a feature of Linux whereby it can get the user that initiated the incoming connection, but this only works when the connection was made through the loopback-device (i.e. 127.0.0.1) or a UNIX socket.

When you’re connecting from a remote computer through the TCP socket, peer authentication isn’t available and the Discourse docker container is configured to have PostgreSQL fall back to MD5 authentication. This uses password hashes stored in the database itself, so these passwords are different from the system user passwords, hence passwd postgres , which changes the system login password, doesn’t affect Postgres.

2 Likes