Update rain to use a multi-stage environment