Skip to content

Commit 69a3c3f

Browse files
committed
Update README.md
1 parent 7b2e157 commit 69a3c3f

File tree

2 files changed

+73
-2
lines changed

2 files changed

+73
-2
lines changed

.github/config-diff.png

250 KB
Loading

README.md

Lines changed: 73 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,74 @@
1-
# Strapi plugin config-sync
1+
# Strapi Plugin Config Sync
22

3-
A quick description of config-sync.
3+
A lot of configuration of your Strapi project is stored in the database. Like core_store, user permissions, user roles & webhooks. Things you might want to have the same on all environments. But when you update them locally, you will have to manually update them on all other environments too.
4+
5+
That's where this plugin comes in to play. It allows you to export these configs as individual JSON files for each config, and write them somewhere in your project. With the configs written in your filesystem your can keep track of them through version control (git), and easily pull and import them across environments.
6+
7+
Importing, exporting and keeping track of config changes is done in the admin page of the plugin.
8+
9+
*Currently only the core_store changes are being tracked.*
10+
11+
**THIS PLUGIN IS STILL IN DEVELOPMENT**
12+
13+
**PLEASE USE WITH CARE**
14+
15+
![Strapi config-sync changes](.github/config-diff.png)
16+
17+
## Installation
18+
19+
Use `npm` or `yarn` to install and build the plugin.
20+
21+
yarn add strapi-plugin-config-sync
22+
yarn build
23+
yarn develop
24+
25+
## Configuration
26+
Some settings for the plugin are able to be modified by creating a file `extensions/config-sync/config/config.json` and changing the following settings:
27+
28+
#### `destination`
29+
30+
The path for reading and writing the config JSON files.
31+
32+
> `required:` NO | `type:` string | `default:` extensions/config-sync/files/
33+
34+
#### `minify`
35+
36+
Setting to minify the JSON that's being exported. It defaults to false for better readability in git commits.
37+
38+
> `required:` NO | `type:` bool | `default:` false
39+
40+
#### `importOnBootstrap`
41+
42+
Allows you to let the config be imported automaticly when strapi is bootstrapping (on `yarn start`). This setting should only be used in production, and should be handled very carefully as it can unintendedly overwrite the changes in your database.
43+
44+
PLEASE USE WITH CARE.
45+
46+
> `required:` NO | `type:` bool | `default:` false
47+
48+
#### `exclude`
49+
50+
You might not want all your database config exported and managed in git. This settings allows you to add an array of config names which should not be tracked by the config-sync plugin.
51+
52+
For now only the `core_store` table is being tracked. Add the `key` value of a `core_store` item to the array to exclude it from being tracked.
53+
54+
> `required:` NO | `type:` array | `default:` []
55+
56+
## TODOs
57+
- Exporting of user roles & permissions
58+
- Exporting of webhooks
59+
- Specify which tables you want to track in the plugin configurations
60+
- Add partial import/export functionality
61+
- Add CLI commands for importing/exporting
62+
63+
## Resources
64+
65+
- [MIT License](LICENSE.md)
66+
67+
## Links
68+
69+
- [NPM package](https://www.npmjs.com/package/strapi-plugin-config-sync)
70+
- [GitHub repository](https://github.com/boazpoolman/strapi-plugin-config-sync)
71+
72+
## ⭐️ Show your support
73+
74+
Give a star if this project helped you.

0 commit comments

Comments
 (0)