I have a setup with different environments called prod and dev.
I need to distinguish API Keys and Urls between these two environments and thought that split-config would be the ideal solution for that.
What I have done so far:
- Created a split config for dev (not active!) because the default sync config should be for prod.
- Duplicated the configurations for the specific modules and changed the values I need for the dev environment.
- Added these configurations to the grey list because I want to keep the configuration within sync.
- Made a condition within the settings.php file to enable or disable the dev split config depending on the current environment.
My deployment looks like this:
drush updatedb
drush cache:rebuild
drush config:import
drush cache:rebuild
What I thought would happen:
In my opinion as soon as the deployment runs on the dev environment the dev split config gets enabled and the drush config:import
imports the config files configured within my dev split-config configuration.
What actually happens:
The configurations from the sync folder are loaded and within the admin ui I can see that the dev configs are staged. I can now use the import config button within the admin ui and after that my dev config is loaded.
What do I want to achieve here?
I want the configuration be loaded within my deployment.
Where do I need help?
The step to open the admin ui and explicitly import the configuration again seems like something is not right with my configuration. Could you please help me here? What am I missing?
Thanks!
Pete
UPDATE:
Here are the steps from the deployment script I use:
drush state:set system.maintenance_mode 1
drush cache:rebuild
- pull everything that is new
composer install --no-dev --no-interaction
drush updatedb
drush cache:rebuild
drush config:import
drush cache:rebuild
drush config:import
drush state:set system.maintenance_mode 0
drush cache:rebuild