Umbraco Cloud: Connect to Development blob storage from Local website
r
Hello, We are thinking about some internal development flows, and we were wondering if it is possible to make my Local instance (cloned from Development) to work directly with the Development blob storage. I am reading docs about Azure blob storage with Umbraco in general but there some differences. Like the connection string is a bit different than what I have in Umbraco Cloud portal. Also, I have to edit the Startup.cs which I don't think is good idea because probably Umbraco Cloud has already some implementation in place. I tried to add some settings in the appsettings.json and even with environmentVariables in the launchSettings.json, but couldn't make it work.
s
Why would you want to do that?
r
We have a case where Dev environment has a log of content and Deploy fails to pull it down. Overall we have hard time to maintain the Content on DEV and we strugle when a Developer doesn't work on a project for a long time and then have to align the content or when we introduce new developer. Deploy throws errors and we need to go and fix stuff spending extra time. So we decided to spin up a container which pulls the DB locally and we connect to that DB instead. But now comes the question with the media. We find it safe enough to just connect to DEV blob directly. This way we don't need to copy a lot of media locally. Also, having the Docker DB container we can easily pull Live database if needed for debugging Live issues when that's nessesary.
In short, from our experience Umbraco Deploy is making our Local dev hard when it comes to involving new devs or when somebody gets out of date not working for a long on the project. That's why we wanted to give it a try to a Docker container which pulls down the whole DB. But now we have a case with the media.
I think that we would give a try by using the CDN option only locally where we specify the DEV URL for CDN. Any pictures uploaded on Local will have to be transfered to DEV to appear locally but at least won't mess up with the Blob storage locally.
We will look again in Umbraco Deploy and what new settings have been added with the latest versions. Would be great if we can control how many children we want to pull from a particuoar root in the content, so we can pull less than all of it and make it work for larger amounts of content. I think we can make more loose in the latest versions with some settings which is great so it doesnt throw many errors if the content has broken ref or such.
s
Yeah, there is partial import now, that should limit how much is going to be pulled in 🙂 But I get your problem, I have just been hurt by sharing a blob container between environments before 🙂
r
I configured the CDN for my Local to be Development URL but images in Backoffice are not working with the CDN and look broken. Any idea if this can be configured to be working somehow? This is what I added in the Startup.cs if (_env.IsEnvironment("Local")) builder = builder.AddCdnMediaUrlProvider(options => { options.Url = new Uri("DEV_URL"); options.RemoveMediaFromPath = false; });