I know that this is an old issue, but db is not defined as a hostname and does not resolve to any IP address.
If I login to the db container then connect to the database, I get....
root@273149152bf5:/# psql postcodesiodb postcodesio
psql (16.4 (Debian 16.4-1.pgdg110+2))
Type "help" for help.
postcodesiodb=# SELECT pg_read_file('/etc/hostname');
pg_read_file
--------------
273149152bf5+
(1 row)
postcodesiodb=# \conninfo
You are connected to database "postcodesiodb" as user "postcodesio" via socket in "/var/run/postgresql" at port "5432".
postcodesiodb=#
postcodesiodb=# SELECT boot_val, reset_val FROM pg_settings WHERE name='listen_addresses';
boot_val | reset_val
-----------+-----------
localhost | *
(1 row)
I know that this is an old issue, but db is not defined as a hostname and does not resolve to any IP address.
If I login to the db container then connect to the database, I get....