La restauration de sauvegarde échoue dans un environnement Docker de développement propre : FATAL : échec de l'authentification peer pour l'utilisateur « postgres »

I have had the same problems.
Finally I inserted the following as a workaround

   if Rails.env.development?
      username = "discourse"
      password = "discourse"
      config["host"] = "localhost"
      config["port"] = 5432
      config["database"] = "discourse_development"
    end

before

  DatabaseConfiguration.new(

into /lib/backup_restore.rb.

I also had to set the password for user discourse via

d/psql -c "ALTER USER discourse WITH PASSWORD 'discourse';"

There might be nicer ways to achieve this.

1 « J'aime »