How do I connect to the host postgres service from the docker container under test?
I don’t really want to use Compose and duplicate the postgres service that is already running on the host as this is not how my container runs in production.
I think I really just need to know the host, username and password
To make sure the instance of Postgres running in the build container is available inside the Docker containers, you will need to make it listen on the interface where the Docker containers will be connecting to it. The simplest way to achieve that is to make Postgres listen on 0.0.0.0, as described here:
This can be done pretty easily but there is no real documentation for it. All you have to do is run the containers with --net=host and then set app to use localhost to talk to services.