How can I override MIX_ENV in preview environments?

Is it possible to use another MIX_ENV in preview environments? right now my render.yaml has

 envVars:
      - key: MIX_ENV
        value: prod
        previewValue: stag

but the value of MIX_ENV for my preview environments is still prod.

Hi @joseph-lozano,

The way you have configured it looks like what we would recommend to achieve this. We’re happy to take a closer look at what’s happening though - could you DM or email support@render.com with the email address of your Render account so that we can take a look?

Thanks!

Thanks… it turned out to be a caching issue, doing a manual deploy + clearing the cache made everything work, and I don’t expect to have to that going forward.

1 Like

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