[Docker] "password authentication failed for user "postgres""

After running docker compose up, I get the following error message:

postgres  | 2023-11-09 14:02:35.575 UTC [37] FATAL:  password authentication failed for user "postgres"
postgres  | 2023-11-09 14:02:35.575 UTC [37] DETAIL:  Connection matched file "/var/lib/postgresql/data/pg_hba.conf" line 128: "host all all all scram-sha-256"
nest      | [Nest] 67  - 11/09/2023, 2:02:35 PM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (5)...
nest      | error: password authentication failed for user "postgres"
[...]

localhost:3000 is not reachable. localhost:5050 (pgAdmin) is.

I have updadet the following line in my .env.dev file:

db_postgres_host: db