Setting up Elixir with Dockerized PostgreSQL

In short, in config/dev.exs change postgres_db hostname to localhost and try again - it should work:

diff --git a/config.exs b/config.exs
--- a/config.exs
+++ b/config.exs
@@ -3,3 +3,3 @@ config :weather, Weather.Repo,
   password: "postgres",
-  hostname: "postgres_db",
+  hostname: "localhost",
   port: 5432,