What is the ideal setup when using ModelsBinding SourceCodeAuto on a local repo and deploying using a CI/CD pipeline?
I am trying to setup my first production installation of Umbraco, and I am struggling with choices with no clear recommendation from the documentation.
Here is my setup (which I considered ideal):
A local git repo with an Umbraco.CMS project created with the dotnet new command. Setup a local Umbraco instance using an SQLite database.
An azure devops CI/CD which deploys my website to an azure webapp, which use a Azure SQL Db (using Managed Identity to auth).
I have customized my project for better production performances and added some features:
created a appsettings.Production.json with Azure specific settings (LuceneDirectoryFactory, MainDomLock, etc.) as suggested in the docs and sets ModelsMode to "Nothing"
enabled RazorCompileOnPublish to benefit from precompiled views in release/production mode
switched ModelsMode=SourceCodeAuto when in Development mode
used typed UmbracoViewPage
enabled search using the documentation and implemented some services and controllers
Here are my observations after some deployments and adjustments:
I have to perfectly recreate all Document Types in local and in production to match the object properties. If I want to add a property, I must add it locally, then deploy my project and add the property again in production.
I had to recreate all templates in the server, because the .cshtml are uploaded but not automatically imported.
The export/import feature for the document types is not enough, because custom media types (for example for the rich text editor) will not be imported
(Obviously) the media nodes will need to be recreated by hand.
After some changes and customization, I realize that this setup is prone to mistakes and differences between the local dev setup and the production.
Should I revert to another ModelsBinding mode?
And in a more general question: what is the best setup to do local dev and deploy to production without much duplication or mandatory steps?
Also, because I am still the sole developer I did not face any problem, but what if my local sqlite DB is deleted (because it is not included in my git repo) or other devs join the project?
What setup are you using? What are your recommendation?
What is the ideal setup when using ModelsBinding SourceCodeAuto on a local repo and deploying using a CI/CD pipeline?
I am trying to setup my first production installation of Umbraco, and I am struggling with choices with no clear recommendation from the documentation.
Here is my setup (which I considered ideal):
dotnet new
command. Setup a local Umbraco instance using an SQLite database.I have customized my project for better production performances and added some features:
Here are my observations after some deployments and adjustments:
After some changes and customization, I realize that this setup is prone to mistakes and differences between the local dev setup and the production.
Should I revert to another ModelsBinding mode?
And in a more general question: what is the best setup to do local dev and deploy to production without much duplication or mandatory steps?
Also, because I am still the sole developer I did not face any problem, but what if my local sqlite DB is deleted (because it is not included in my git repo) or other devs join the project?
What setup are you using? What are your recommendation?
Did I miss something in the documentation?
Thank you all! 🫶
is working on a reply...