drupal-8civicrmaegir

Adding modules/themes to a platform after it has been built


New user here...

Installed D8+Civi by building a composer based git repo for the platform then stamping out a few test sites.

It worked really well.

But now I am at the point of realizing I missed a few modules and I want to add some themes to apply to the sites.

I can easily to it in the git which was used to define the platform. But what is the proper way to manage the central platform data and files that are then used for the x number of sites.

I know the docs try to discuss this be a tutorial walk-through would be very helpful.

As a guess, I could make the central platform files a git clone and pull down clones for the new stuff. But if there was a need for an database updates that wouldn't get done.

Ideas?

Thanks


Solution

  • It's not clear what you mean by "central platform data".

    If you mean assets that are relevant for the entire platform, that can apply to all of the sites, you would do the following:

    1. Add anything new to Git and push it.
    2. Create a new platform to match the latest code in Git.
    3. Ran a Migrate task on the old platform to migrate the sites to the new one.
    4. Database schema updates happen automatically.
    5. The sites will now be running on the new codebase.

    If you're talking about site-specific assets that you don't want to be included in the platform's code, then you can enable Git for sites with the Aegir Hosting Git module.

    It allows you to deploy site-specific Git repositories.

    However, I don't recommend using that module for platforms, just sites, because it allows you to git pull on Production sites, which is a terrible idea. For that, see Aegir Deploy.

    Both of these modules ship with Aegir so you won't need to install them. Some of the Hosting Git features may need to be enabled, however.