Copied to clipboard

Flag this post as spam?

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


  • NullableType 3 posts 83 karma points
    Feb 26, 2020 @ 00:30
    NullableType
    0

    One codebase with multiple databases?

    Hi there!

    I have searched around for a answer to the following query with no solution to be found. Apologies if I have overlooked a similar query and, if so, I'm happy to pointed in the right direction.

    We are currently wanting to understand if it is possible to build our "platform" on one codebase which would then be deployed to multiple different environments for different clients. The reason for this is that we have identified a lot of effort duplication and wish to standardize most features of our web app which is 90% the same between clients. We are, however, aware that document types and settings etc are saved to the Umbraco Db and therefor may not be easily shared between disparate client instances.

    Ideally we would build off one master Db where all our document types and settings etc would be stored -- with the exception of user data etc. We would then deploy our code to each client's environment which would point to its own Umbraco Db for the content.

    Basically we wish to find out if it is possible to copy all the settings data from the master Db to the client Dbs when doing our deployment leaving the individual client Dbs content tables untouched -- being unfamiliar with Umbracos Db schema I'm unsure if this is feasible and, if it is, which tables should be touched or untouched.

    Note: We are aware we could take a multi-site approach with one instance but this is not ideal due to things like client hosting stipulations, possible content contamination between clients, a single point of failure and other business factors like monitoring individual client hosting costs etc.

    Hopefully I have adequately explained what we hope to achieve and thanks in advance for any help.

    Cheers!

  • Marc Goodson 2141 posts 14344 karma points MVP 8x c-trib
    Feb 27, 2020 @ 07:05
    Marc Goodson
    100

    Hi NullableType

    Have a look at uSync

    https://our.umbraco.com/packages/developer-tools/usync/

    It's a plugin for Umbraco, and it takes all the settings for an Umbraco build that live in the database eg Document Types, Templates, Dictionary items etc, and serialises them to XML files on disk.

    It allows you to export from one Umbraco to files on disk, and then import those files back into a different version of Umbraco, it's therefore ideal for using alongside a 'starter' Umbraco build... As you can spin up a new Umbraco site, and then import a 'set' of starter uSync files, that will restore all your common Document Types.

    With manipulating the database, it gets a bit complicated, because the ids of objects aren't necessarly unique between Umbraco installs, anyway it sounds like uSync would be worth investigating first for your needs before you start playing around in the db!

    regards

    Marc

  • NullableType 3 posts 83 karma points
    Mar 02, 2020 @ 10:50
    NullableType
    0

    Hi there

    Apologies for the later reply.

    This looks promising so I'll definitely take a look. Would this solution only work for exporting the common document types to a new Umbraco build or could we use it to export document types etc that we build off our "master" Umbraco build at a later date also? In effect pushing updates and new features.

    Cheers for the response!

  • Marc Goodson 2141 posts 14344 karma points MVP 8x c-trib
    Mar 02, 2020 @ 16:07
    Marc Goodson
    0

    Hi NullableType

    Yes you could do this, using either 'snapshots' (take a snapshot of your site, before your feature iteration, and then again afterwards - and you can apply your feature snapshot to other environments) or if your builds are forks of the original build in git, then by using the files that uSync generates, that are in source control.

    also there is a 'paid for version' too - called uSync Complete that has a GUI for moving different between environments

    https://our.umbraco.com/packages/developer-tools/usynccomplete/

    (depends on who would be responsible for moving things, eg editors may prefer the GUI!)

    regards

    Marc

  • NullableType 3 posts 83 karma points
    May 25, 2020 @ 00:11
    NullableType
    0

    I must apologize for an incredibly late response, but just as quickly as this question was raised due to discussions that came up in the office we had moved on to something else. So after all this time I'm only getting around to checking this out and uSync looks perfect for our scenario. Thanks for the pointer!

  • Patrick van Kemenade 101 posts 339 karma points
    Mar 02, 2020 @ 11:11
    Patrick van Kemenade
    0

    Definitly take a look at uSync like Marc suggested. An additional thing to consider if you haven't already.

    We are, however, aware that document types and settings etc are saved to the Umbraco Db and therefor may not be easily shared between disparate client instances.

    Not nescessary another approach to this would be to use a different models builder (LiveAppData for instance) then you would have al DataTypes created/stored in code, and you can easily set this up in a way that this stored in a different project then the main project.

    Just the View keep being in the main project but this way you have a much better seperation between the Umbraco core (+Views/Maco/Partial) and your own custom additions.

Please Sign in or register to post replies

Write your reply to:

Draft