You should add the user and database option for the command pg_isready.
pg_isready -U myUser -d myDb
see the following post