MongoDB.live, free & fully virtual. Register Now MongoDB.live, free & fully virtual. Register Now

CD for hosting while using UI for Realm

Hi,

I setup Realm hosting using a git repository and this successfully replaces files on the hosting service when I make a change. However, this also seems to undo changes I made in the UI for non-hosting files.

I don’t really want to go back to picking files one-by-one in the UI for front-end deploys. I want it to be automated CD. Is there any way to get changes made in the Realm UI to sync back to github? It seems like a one-way binding.

Is there a way to have both worlds? I want to use the Realm web UI + automate Front-end deploys.

Hey Travis,

Have you considered using the automated GitHub deploys for both hosted files and other changes to your Realm app (like functions, triggers, etc)? More information is available at https://docs.mongodb.com/realm/deploy/deploy-automatically-with-github.

I’ve successfully used this for my project and found it really helpful. All of the details of how I setup the auto deploys as well as a video demo are included in the project readme: https://github.com/mongodb-developer/SocialStats.

Hey thanks @Lauren_Schaefer !

Yes, I’m using github deploys for the hosting - and that’s where I ran into trouble.
I build+copy my hosted files over from the front-end app into the hosting/files directory, commit and push and it auto-deploys.

The problem I run into is that it overrides the changes (like say, a login or schema/graphql change) that I made in the UI, reverting them back to previous settings.
Those changes don’t seem to get back to github. Should they? Do you think I set something up incorrectly?

I am going to take a look at that project you referenced though. It looks super thorough and I’d love to get a 4-stage pipeline going. Thanks again!

1 Like

I think that what you’re describing may be expected. Let me ask around, and I’ll get back to you.

@Travis_N_A I was able to replicate the issue you’re hitting. I talked with the team, and this is a bug. We’ve filed a ticket around the GraphQL changes being lost.

In general, changes made in the UI that have been deployed should not be lost when you push changes to your GitHub repo. The changes made in the UI will not be pushed to your GitHub repo.

1 Like

Thanks @Lauren_Schaefer - is the bug list somewhere online? I just ran into the issue again when re-deploying and would like to track it so I know when its resolved.

Also took a look at your example repo/video and learned a lot, thanks! It’ll be a while before I can setup that kind of pipeline but eventually…