Changing environment groups on PR previews

In the docs,
Pull Request Previews | Render it says: “Make sure to change environment variables on your PR instance if you want it to use a staging or test databas”

Can I do this automatically with some config files or hooks? I want to have two environment groups, one for production and one for development, all the PR previews should use the dev group.

Our workflow is pretty simple

  1. Developer works on a feature on a branch
  2. When he is happy he creates a Pull Request
  3. Render should spin up the pull request BUT use a dev database.
  4. When everybody is happy we merge it main branch.

Best regards
Bergur

Hi there,

Thanks for reaching out.

Pull Request Previews only spin up a copy of the service where it is enabled.

The flow you described sounds like a Preview Environment, which will spin up new copies of all services (e.g. a Web Service, a Postgres instance and a Redis instance) defined in the Blueprint/render.yaml when a PR is raised.

Hope that helps

Alan

1 Like

Hey al_ps

Thanks for pointing me in the right direction.

Best regards
Bergur

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.