Hey guys, i’ve started to using strapi and it’s been a blast, but i ran into a problem:
how can i keep the view configuration of the content/content-builder when deploying the application?
I filled a lot of things (labels, descriptions and so on) and after putting it into the dev environment everything is gone.
Sadly no solution - I’d just like to bump this. I also would like to have these settings to be saved in my repository. I’m afraid they are “loked away” in the database?
So yes they are in the database - and you have to restore them in each environment, but the links are broken. I found the correcsponding docs though:
Weirdly, npm run strapi config:dump -f configdump.json did not work for me (neither with absolute paths). So I had to use npm run strapi config:dump > configdump.json. This just dumps the whole consoleLog in a file, so I had to manually remove the first part and use an Unescape-Json tool to create a valid json… not optimal.
Update - after installing strapi globally, it worked with -f strapi configuration:dump -f ./config-dump.json
As a suggestion - if any developer reads this: Why not make it configurable which settings are stored in the DB and which are stored in subfolders (which are managable by git). This way changing a view or fiel-description could much more easily be synchronized between stages. I’ll perhaps do a proper proposal once I understand strapi better.
Firstly, thanks so much for your effort in helping out with this Simon!
I tried these commands before but they didn’t work too, I’m going to try to install strapi globally and dump the configurations again.
And I agree, we should definitely have some sort of option/configuration to keep it or choose it’s destination.
It keeps the changes using files tracked by git, under the admin folder.
After installing it and rebuilding the strapi, you gonna have a section inside the Configuration menu where you can see the differences in the actual configuration and the incoming one, like a git diff.