• 3 Posts
  • 12 Comments
Joined 1 year ago
cake
Cake day: June 11th, 2023

help-circle

  • Yeah the name you want for the database host is postgres, or whatever the container is named in the docker-compose.yml.

    I was curious about this, and it turns out both work. I tested by pinging both postgres and lemmy_postgres_1, and both responded with the same IP address. Good to know, but I did go ahead and change it back to postgres

    Maybe try a very simple password temporarily like test, rebuild the postgres container/delete the volumes and see if it works.

    I did this, and I’m still getting the same error, so obviously something is wrong.



  • Thank you for enlightening me on the -W option in psql. I have successfully logged in using the expected password for lemmy. This points to something with the connection string. According to the error log, the connection string being used is:

    postgres://lemmy:<my percent-encoded password>@postgres:5432/lemmy
    

    As far as I can tell, the percent encoding is correct. Any ideas how to troubleshoot this further?

    edit: it just occurred to me that my container name is lemmy_postgres_1, not postgres as was entered in my lemmy.hjson file. Let’s see if changing that will work…

    edit2: no, that had no effect. I’m getting the authentication error for user lemmy on both the lemmy container and the postgres container. :(