Overview
The Config Sync plugin for Strapi provides users with the ability to sync configuration data across different environments, aiding in keeping database records consistent. By exporting data as JSON files, users can easily version control their configuration data and track changes in their version control system (git).
Features
- CLI - config-sync: CLI for syncing config from the command line.
- GUI - Settings page: Settings page in Strapi admin for syncing config.
- Partial sync: Import or export specific portions of the config.
- Custom types: Include custom collection types in the sync process.
- Import on bootstrap: Facilitates easy automated deployment with importOnBootstrap.
- Exclusion: Exclude single config entries or all entries of a given type.
- Diff viewer: Git-style diff viewer for inspecting config changes.
Installation
To install the Config Sync plugin:
- Install the plugin in your Strapi project.
- Add the export path to the
watchIgnoreFiles
list in theconfig/admin.js
file. - Rebuild the admin UI to include this plugin by running:
npm run build && npm run develop
- The Config Sync plugin should now appear in the Settings section of your Strapi app.
- To start tracking config changes, make the first export to the
/config/sync
directory using the CLI or Strapi admin panel.
Summary
The Config Sync plugin for Strapi offers a convenient solution for syncing configuration data, allowing users to export and import data on different environments. This plugin simplifies the process of maintaining consistent configuration across various instances of a Strapi project.