We’ve recently made a number of changes in the production environment, and now I’d like to copy the current production layout to another (remote) environment — specifically, the Staging one.
I understand this is related to the development workflow and the forest CLI, but even after going through the docs and the CLI help, I still can’t tell how this is meant to be done.
Previously, the forest CLI used to have forest environments:copy-layout, which, as far as I understand, has been deprecated/removed.
Could you please advise on the recommended way to bring the production layout over to the staging remote environment?
Hi @Matteo
The development workflow is here for that. If you made any change on the production environment (the reference one) all child environment should take these changes.
If not, there is an issue or a change inside child env who “revert” the change you made on the production.
To be clear, a child env is build from the production + changes applied on the child env.
I understand.
I’m not sure I can rule out that there’s some issue. But for sure, the layout of the STG environment (which is based on prod) has received changes.
What I’d like is a simple outcome… I’d like to overwrite everything (about layout) in STG with the prod layout.
It should be kept in mind that STG has some features (a few smart actions and some changes in the collection configurations) that are not present in prod.
How can we proceed?
Should we do a reset with the cli of the stg environment then?
What do you mean by some changes in the collection configurations , do you want to keep them?
I mean to say that in our codebase we have (for example) added fields to some collections, because in our DB models we have also added fields there. So the Forest schema has changed. We might also have added some smart actions that we haven’t released to prod yet, but are already on staging.
I imagine that the reset doesn’t create problems and that when Forest restarts on your side after the reset, it behaves exactly like when these changes are released in our codebase for the first time. Correct?
…and I got the expected outcome.
And I also confirm that forest behaves exactly as if I had just released to staging (in my codebase) the changes that differentiate this environment from prod.