I didn’t find any example of environment feature of Realm sync. I want to use two environments. “DEVELOPMENT” environment for development branch of my code. A “PRODUCTION” environment for the Main(Production) branch of my code.
I already created a Realm app with “DEVELOPMENT” environment tag. I am using this app to do the initial development work of my app. I want to keep this app for further development and experimentation.
What needs to be done to keep a separate environment for the production?
These environment tags allow Realm values to take on different values, depending on the environment (docs). For example, in “development” you might want to use creds for a test Stripe account rather than the one that accepts real payments.
By changing the environment, your app’s behavior changes based on those Realm Values.
Realm application is owned by a project/cluster. It was suggested to me that different environments should be different projects. How are Realm applications organized into different environments?
It seems like Realm application environments either share a single cluster — or I have the migrate the application across projects throughout the development cycle? Neither of these make sense?
There is a great presentation that @Lauren_Schaefer did for this year’s MongoDB .live 2021 that was all on managing Realm Apps environments and integrating the config into SDLC - I really suggest you check it out!