diff --git a/sandwich-contexts-kubernetes/lib/Test/Sandwich/Contexts/Kubernetes/PostgresServer.hs b/sandwich-contexts-kubernetes/lib/Test/Sandwich/Contexts/Kubernetes/PostgresServer.hs index 1ea109ce..4e0def79 100644 --- a/sandwich-contexts-kubernetes/lib/Test/Sandwich/Contexts/Kubernetes/PostgresServer.hs +++ b/sandwich-contexts-kubernetes/lib/Test/Sandwich/Contexts/Kubernetes/PostgresServer.hs @@ -205,6 +205,10 @@ postgresYaml name namespace image username password database extraEnv = [__i| exec: command: - pg_isready + \# Without -h this checks the Unix socket, which initdb's temporary + \# server answers before 5432 is open. + - -h + - 127.0.0.1 - -U - "#{username}" initialDelaySeconds: 5