Healthchecks that used `pg_isready -p 5432` were incorrectly flagging
the container as being healthy during initialization phase since
healthchecks are being run inside the container itself, so
`listen_addresses='localhost'` was not enough. Setting
`listen_addresses=''` forces the server to only listen on the unix
socket so no ports are open that might incorrectly interfeer with the
healthchecks.
Adds support for the POSTGRES_INITDB_XLOGDIR environment variable, which specifies where the postgres transaction log is stored.
For some use cases, being able to place the transaction log on a different volume is useful.
Existing support for providing flags via $POSTGRES_INITDB_ARGS is inadequate because of the need to create and chown/chmod the directory prior to running initdb.