Updating the mongo url generation to properly resolve environment variables