https://www.growthbook.io/ logo
f

freezing-horse-8684

09/12/2023, 6:22 PM
Hi Everyone, We have self hosted in qa environment. We also wanted to host one more for higher environments. We have couple of reasons behind it. One is qa is not very stable and the other is user management. The problem is, When I have two/multiple environments where I set this up as a separate service, How do we copy the feature from qa to higher environments. Any API's available? I dont want to do it manually. Please suggest
👀 1
s

stale-energy-37042

09/12/2023, 6:26 PM
Not sure if this will apply to how you want to host it, but growthbook has the ability to separate flags by environment. I am self hosting in my config as well. Here is how I have it setup: I have growthbook admin hosted in a shared environment. I have backend hosted in dev for a dev backend sdk endpoint I have a backend hosted in prod for a prod backend sdk endpoint All share the same growthbook database so the features can be deployed to each environment
f

freezing-horse-8684

09/12/2023, 6:30 PM
Thanks for this Josh. I wanted a way to copy the features that are already added in one environment to another environment. Both are different setups and pointing to different database s.
s

stale-energy-37042

09/12/2023, 6:33 PM
The rest api doesn't seem to have a post for features. Maybe this could be done using mongo queries?
f

freezing-horse-8684

09/12/2023, 6:35 PM
Yes , I was also thinking if there is any way we can directly write to MongoDB through some queries. Wanted to get clarity on this so that I dont mess this up while copying the data from MongoDB
b

brief-honey-45610

09/12/2023, 6:39 PM
Thanks for chiming in, Josh! Nagesh, I’ll ask the engineering team about this and get back to you shortly about the best approach.
Are you wanting 2 separate self-hosted versions of GrowthBook?
Or are you talking about 2+ environments within one self-hosted instance?
Hey @freezing-horse-8684, there is a dropdown menu with a “Copy to …” selection. Is this what you’re hoping for?
That would be for copying one feature in one environment to another environment
f

freezing-horse-8684

09/13/2023, 1:47 AM
@brief-honey-45610 There will be two self hosted instances. Both instances are tied to different databases. I want to copy from one instance to another
b

brief-honey-45610

09/13/2023, 2:46 AM
Hi Nagesh. I will connect with the team during US business hours tomorrow morning and reply here with more info.
👍 1
f

fresh-football-47124

09/13/2023, 4:12 AM
Hi Nagesh - is there a reason you’re running two GrowthBook instances? The environments allow for segmentation. If you really want to run two, you’d have to use the APIs to copy between the two
f

freezing-horse-8684

09/13/2023, 4:14 AM
@fresh-football-47124 Hi, Can you share these API documentation.
f

fresh-football-47124

09/13/2023, 4:14 AM
f

freezing-horse-8684

09/13/2023, 4:25 AM
Thanks Graham. Really helps. Will reach out to you if any issues