Sync Views for different environments

System Information
  • Strapi Version: 3.3.4
  • Operating System: Ubuntu 20.04 under WSL2
  • Database: MongoDB
  • Node Version: v12.18.3
  • NPM Version: 6.14.8
  • Yarn Version: 1.22.4

Hi everyone, just started using strapi for a new application. One thing we’ve noticed is that Views for content types are not checked into git, meaning that they are not synced for development and production.

I noticed that this is saved inside the database, in my case MongoDB in the core_store table with key plugin_content_manager_configuration_content_types::application::tool.tool for my tool content type.
So far we’ve had the idea to automatically export this data on change and import it on startup. But is there a different way?

Thank you in advance!

To dump configurations you should use cli:

As an idea how to automate this:

  • Add a script to package.json that generates the dump and then does the git add dump.json && git commit -m "add dump configurations" && git push
  • Add a script that imports the config file.
  • Before making the final push you should always run this script if you modified something in configurations.
  • On production, after running the git pull, you should run the script that imports the configurations.

Thank you very much, that’s exactly what I was looking for.

1 Like

To Sync View and roles and permissions for different environments
Install Config Sync plugin
here is the link : Config Sync | Strapi Market