Rewrites deployment to get separate postgres db fully working.