How to dynamically set environment-specific variables after Marketplace installation?

Hi everyone,

I’m working with a setup where I have a dev environment and a code repository that dynamically sets a media set URL. This works fine during development.

However, after installing the app from the Marketplace on a prod environment, the build is executed automatically, and I’d like to change the media set URL depending on the environment (e.g., dev vs. production). Ideally, I want the program to read environment variables to determine which space or scope it’s running in.

Here’s what I’m trying to figure out:

  1. Are there any environment variables automatically set for different scopes / projects?
  2. Where in the code repository or deployment pipeline would these environment variables typically be defined or accessed?

Any guidance on how to structure this or best practices for managing environment-specific configurations post-installation would be greatly appreciated!

Thanks in advance!

Could you please provide the solution for the same.