oliverdavies.uk/content/node.92b0bd2f-d0fe-4d21-b208-961525c053ea.yml

92 lines
3.7 KiB
YAML

uuid:
- value: 92b0bd2f-d0fe-4d21-b208-961525c053ea
langcode:
- value: en
type:
- target_id: daily_email
target_type: node_type
target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7
revision_timestamp:
- value: '2025-05-11T08:59:58+00:00'
revision_uid:
- target_type: user
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
revision_log: { }
status:
- value: true
uid:
- target_type: user
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
title:
- value: 'Automate Drupal deployments with configuration'
created:
- value: '2025-04-20T00:00:00+00:00'
changed:
- value: '2025-05-11T08:59:58+00:00'
promote:
- value: false
sticky:
- value: false
default_langcode:
- value: true
revision_translation_affected:
- value: true
path:
- alias: /daily/2025/04/20/config
langcode: en
body:
- value: |
<p>Almost all Drupal projects have multiple environments - production and one or more pre-production environments.</p>
<p>A lot have development and staging, some have QA or UAT, or an environment per feature or sprint.</p>
<p>Each Developer has their own local environment to work on.</p>
<p>As new things are added, such as content types, fields and views, they need to be present on all environments.</p>
<p>When I started using Drupal, I needed to perform the same steps to manually recreate the changes on each environment.</p>
<p>Later, people started to use the Features module to export configuration into modules that could be committed and deployed as code.</p>
<p>This was accompanied by "deploy" modules that included update hooks to revert features or perform other tasks.</p>
<p>Since version 8, Drupal has had the Configuration Synchronization module.</p>
<p>Developers make changes once and export them to files using a simple command like <code>drush config:export</code>.</p>
<p>Once the code has been deployed to each environment, run <code>drush config:import</code> to import the changes.</p>
<p>This will synchronise the configuration on the environment, making it the same as the exported configuration in an automated way - the same way every time.</p>
<p>Much quicker and more robust than doing it manually.</p>
format: full_html
processed: |
<p>Almost all Drupal projects have multiple environments - production and one or more pre-production environments.</p>
<p>A lot have development and staging, some have QA or UAT, or an environment per feature or sprint.</p>
<p>Each Developer has their own local environment to work on.</p>
<p>As new things are added, such as content types, fields and views, they need to be present on all environments.</p>
<p>When I started using Drupal, I needed to perform the same steps to manually recreate the changes on each environment.</p>
<p>Later, people started to use the Features module to export configuration into modules that could be committed and deployed as code.</p>
<p>This was accompanied by "deploy" modules that included update hooks to revert features or perform other tasks.</p>
<p>Since version 8, Drupal has had the Configuration Synchronization module.</p>
<p>Developers make changes once and export them to files using a simple command like <code>drush config:export</code>.</p>
<p>Once the code has been deployed to each environment, run <code>drush config:import</code> to import the changes.</p>
<p>This will synchronise the configuration on the environment, making it the same as the exported configuration in an automated way - the same way every time.</p>
<p>Much quicker and more robust than doing it manually.</p>
summary: null
field_daily_email_cta: { }