Build a Weather Station with Elixir and Nerves: Problem connecting to Postgres with Grafana

Title: Build a Weather Station with Elixir and Nerves: Problem connecting to Postgres with Grafana on (page 64)

If you follow the defaults for docker-compose then the postgres database will not allow you to connect to it with a connection refused error.

Sample error message from the logs:
grafana_1 | t=2021-10-31T20:39:21+0000 lvl=eror msg=“query error” logger=tsdb.postgres err=“dial tcp 127.0.0.1:5432: connect: connection refused”