Configure postgres and install Foundation