Skip to content

Version control

DXPR Builder settings, templates and profiles are Drupal configuration, so they go into git with the rest of your configuration. Pages are content and stay in the database. This page lists which is which and how to move each between environments.

What goes into version control

Type Version controlled How
Settings Yes, once the product key is in a key Configuration export; see below
Page templates Yes Configuration entities
User templates Yes Configuration entities
User profiles Yes Configuration entities
Product key Only without its value Key entity; see below
Page content Typically no Stored in the database
Uploaded files Typically no Stored in the files directory

Configuration management

Export the configuration:

drush config:export

This writes these DXPR Builder files to your sync directory, often config/sync/:

  • dxpr_builder.settings.yml
  • dxpr_builder.page_template.*.yml
  • dxpr_builder.user_template.*.yml
  • dxpr_builder.dxpr_builder_profile.*.yml
  • key.key.dxpr_builder_jwt.yml, or the Key entity you selected for the product key

Important: under the default Configuration storage, dxpr_builder.settings.yml holds your product key in clear text, as json_web_token. Before you commit that file, set Storage method to Key module at DXPR Studio > DXPR Builder > General Settings (/admin/dxpr_studio/dxpr_builder/settings). Pick a key whose provider reads an environment variable or a file; saving the form then clears json_web_token. A key with the Configuration provider still stores the value in its own exported file, so change its provider first at Configuration > System > Keys (/admin/config/system/keys). Then export again and commit these files to your repository.

Deploying configuration

On the target environment:

drush config:import
drush cache:rebuild

This applies settings, templates and profiles from version control.

Content between environments

Page content (the HTML in text fields) is database content, not configuration. To move it:

  • Use the Default Content module to export and import content as YAML.
  • Use Content Synchronization for ongoing content sync between environments.
  • Move one page's markup with Drush: drush dxb:page:get 42 prints it under markup in YAML, and drush dxb:page:update 42 --markup=@page.html writes it to a page on the target, as a new revision.

Workflow for teams

  1. Developers create page templates locally.
  2. Export configuration and commit.
  3. Push to the repository.
  4. Deploy to staging for review.
  5. Deploy to production after approval.

What's next?

CI/CD pipelines for automated deployment to continue exploring DXPR Builder.

Something wrong or missing on this page? Report it or edit the page.