How to run a PR workflow with local DB and docker?

I have currently disbaled PR preview feature because it’s unclear how it plays with databases.

We often make migrations in our PRs and we don’t want that to apply to our staging DB that’s deployed to develop branch. We only want it to apply after we merge the feature/* branch to develop.

When we make a feature/* branch - I would ideally like to have a clean local DB, and all of our services … NodeJS, DB, Nginx, Static site, all served via one docker container. The DB can be seeded with a command.

Is this workflow possible in render?

Hi @viperfx! It sounds like you are using the PR Preview feature, but our Preview Environment feature may be more suited to your needs here. When setting up a Preview Environment, you’ll be able to have a copy of all your services in a new environment. You can also use an initialDeployHook to seed your fresh Database with data.

Yep that seems like what I need. I reviewed the docs and the features I am using with Render. One thing not clear to me:

Environment variable overrides are supported for web services, private services, and environment groups.

How can I override or specify a specific env group?

A couple of other questions

  • I currently do not use YAML config yet, when I started using Render quite a few features were not supported in the spec. Is the YAML spec feature-complete with render?
  • If I currently have non YAML apps, will I have to convert my apps to YAML spec before enabling preview? or is there an option to use YAML spec only for preview envs?
  • My app needs access to the URL render deploys on for preview, for e.g. the API path and client side. How can I set this URL to an existing env variable?