How to run Umbraco in offline mode?
t
Hi I've read that Umbraco 13 could be run under offline mode. I might be using incorrect words to describe what I mean so I'll explain a little more. An Umbraco site can be run where the database connections do not need to be used, the sites files are cached so trips to the server are extremely limited. An upgrade can be carried out and the site never goes down. Only when it's necessary it would make database calls or update cached content. It might be part of Umbraco going green (meaning it's more environmentally friendly). Does anyone know how to get started with this or what is needed for this to happen? Thanks
s
Your whole frontend shouldn't need to access the database once Umbraco has been booted (and often not even when rebooting, depending a bit on what you do). But the backoffice doesn't work without a db and there is no "offline mode". Maybe you're thinking of static site generator solutons? That's when Umbraco is running somewhere for backoffice editing and the frontend is built only when something updates in Umbraco, generating static html?
Ps. This is an Umbraco question, next time, make sure to use #1125392773038755890 😉
m
Sounds like a idea to me.. as you say @Sebastiaan if say the db was down would be great if even during boot.. umbraco could say I don't need the DB I can use nucache and examine index caches and carry on happily (if at areduced level of functionality). Also thinking loadbalanced subscriber where the backoffice has been disabled, so no requirement for the db (would catch up with the distributedcacheinstructions when the db came back online)? Even calls that might need the db like member change pwd/uform submit could return a try again later?
Copy code
csharp
app.UseUmbraco()
    .WithMiddleware(u =>
    {
        //u.UseBackOffice();
        u.UseWebsite();
    })
    .WithEndpoints(u =>
    {
        u.UseInstallerEndpoints();
        //u.UseBackOfficeEndpoints();
        u.UseWebsiteEndpoints();
    });
65 Views