I am building a Drupal 8 site and I have done some research whenever I should use Configuration Management or Features to export configuration and include it in my profile. In order to export and import configuration with Configuration Management from one site to another, sites have to have the same UUID. It means that they have to be a clone of each other. There are two ways to achieve this:
- Clone the DB from one site to the other in order to have the same UUID
- Programmatically modify the UUID to match the one in configuration
The site I am going to build will have its own profile installation and my intention is to keep configuration or features within the profile. I have already created my profile installation but now I have to include configuration in a way it does not depend on UUID so I can:
- Spin up a fresh development environment using profile installation
- Develop new functionalities
- Export new functionalities in the profile
- Deploy it to prod and apply new functionalities without re-installing the site
How can I export configuration and add it to my profile? Should I use Configuration Management and manually remove the UUID or should I use Features and add it to my profile?
Using the Features module, I am not able to set the destination for my features. I would like to put all my features under profiles/my_profile/feature. When I create it I am not able to set a destination so it gets saved under modules/custom. I manually moved it from modules/custom to profile/my_profile/features. If I update it, it will not update the features I moved but instead it will create a new feature with the same name under modules/custom. How can I setup a custom destination?