Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ian Robinson 79 posts 143 karma points
    Mar 09, 2018 @ 10:31
    Ian Robinson
    0

    LiveAppData Models and publishing to Azure

    Hi,

    For a while now I've been following the steps set out in this great blog post and the Umbraco documentation, and using the LiveAppData ModelsMode in my web config.

    https://24days.in/umbraco-cms/2016/getting-started-with-modelsbuilder/ https://our.umbraco.org/documentation/reference/templating/modelsbuilder/

    I can see the document types being generated in a folder in my project as C# classes and I can commit them using Git. So that's all great.

    I'm publishing my Umbraco site to an Azure App Service and this appears to be working well except for one thing. If I create a new document type or amend an existing one locally, the C# class is updated in my Visual Studio project, but when I publish the application to Azure I was expecting to see that new or amended document type appear in the live website's backoffice but it doesn't. Is this because even though I have a C# class of the model/document type, I'm not publishing the database and this contains the missing information the live site needs?

    I'm a bit confused as to why I'm not seeing the document type appear and wondering if my understanding is incorrect?

    Is best practice to do something else, such as add the document types to a package and output that locally, then install the package to my live site?

    Thanks, Ian.

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Mar 14, 2018 @ 11:03
    Jeavon Leopold
    101

    Hi Ian,

    Umbraco ModelsBuilder is a "Code After" approach, it generates C# models based on what exists in Umbraco.

    In your case when you deploy your dll, the C# model exists but the document type does not and it will not be created automatically.

    In Umbraco Cloud there is a project called Umbraco Deploy which takes care of migrating all changes between environments. Outside of Umbraco Cloud I would recommend you have a look at the uSync project as this can be used to successfully migrate doctype & data type changes between environments.

    Hope that's helpful.

    Jeavon

  • Ian Robinson 79 posts 143 karma points
    Mar 14, 2018 @ 11:38
    Ian Robinson
    0

    Thanks Jeavon,

    That's really helpful yes. Thank you.

    I've used uSync before so I'll do so again in conjunction with Umbraco ModelsBuilder.

    My understanding of what is used for what was obviously wrong but thanks to your explanation, I think I understand the process and how I can organise my workflow to help speed up my publishing of websites while ensuring everything is committed to GIT and my test, stage and production environments are in sync.

    I've not looked at Umbraco Cloud yet, but it's on my list of things to do.

    By the way - I enjoyed your article last month on what tools you use to build your Umbraco sites. It's really useful to see what other people use and find new technologies or techniques I can use in my own build process. Thanks for this.

    Ian.

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Mar 15, 2018 @ 16:21
    Jeavon Leopold
    0

    Hi Ian,

    No problem, we use ModelsBuilder and uSync for all of our projects.

    I'm really glad you enjoyed the Skrift article I always like to hear that others found these insights useful.

    Jeavon

Please Sign in or register to post replies

Write your reply to:

Draft