I have the following scenario:
I will develop an application based on Drupal.
Everything will be developed on a local instance.
Composer files, configuration and so on will be kept in a git
repository.
The repository will be hosted on GitLab.
I will use the CI/CD features over there.
I will need one test instance.
The project starts with one production instance. In the future, there will be additional production instances. They all should have exactly the same configuration, but different content.
I already did something like this, where I copied the initial database from my local install to my test and production server.
Afterwards, my CI/CD scripts could load the configuration from git
to the different instances.
But there, I only hat one production server.
If I remember correctly, configuration is bound to an ID of the initial database. So, I can't just set up a new instance and load the configuration from the old one.
Since they all will have exactly the same configuration, I would love to have a develop
branch for delivering to the test server and a master
branch to deliver to all production servers. If there are better solutions, I'm also open for them.
What would be the best workflow to add additional instances in the future that use the same config and can receive updates from the same CI/CD?
Would this workflow be completely incompatible in the case that, somewhere in the future, one instance would start getting additional configuration?
drush site:install --existing-config
. Otherwise, like with the standard profile, you only have to ensure the new site has the same UUID (you can set with Drush as well) and then import the config from the other site. Or make your own profile.--existing-config
seems also to be interesting. Have to see, what matches best for my composer CI/CD workflow.