- Home
- Manage the site
- Run it in production
- Version control
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.ymldxpr_builder.page_template.*.ymldxpr_builder.user_template.*.ymldxpr_builder.dxpr_builder_profile.*.ymlkey.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 42prints it undermarkupin YAML, anddrush dxb:page:update 42 --markup=@page.htmlwrites it to a page on the target, as a new revision.
Workflow for teams
- Developers create page templates locally.
- Export configuration and commit.
- Push to the repository.
- Deploy to staging for review.
- Deploy to production after approval.
What's next?
CI/CD pipelines for automated deployment to continue exploring DXPR Builder.