configure postgres and add foundation