Using a node script to wait for pg as it's more reliable.