Hyanghee Lim Hyanghee Lim - 1 month ago 7
Java Question

What purpose 'crafter-environments-store' serves other than keeping copies of what's made live?

I have noticed that from Crafter Studio 2.5.x it creates copies of live items in crafter-environments-store/site folder in the filesystem.

Is there any other use of this location in Studio, and how does Studio keep a track of what's in the folder? For example, if I replace all files in that folder, would Studio still behave normally and continue to place live items in the folder?

Answer

The environments folders are part of the deployment mechanism. Rather than copy content from the repository which may have a write contention, content that has been committed to be deployed to a specific environment is copied to those disk based locations and then from there, transferred to the deployment endpoints of the target environment. These folders are a mirror copy of what the target environment will be once it's completely updated by the deployment mechanism.

Is there any other use of this location in Studio:

No.

How does Studio keep a track of what's in the folder:

It does not track the contents of the folder per se. It knows what has been deployed to that environment and puts items in to the folder (from the repository) prior to transferring them.

If I replace all files in that folder, would Studio still behave normally and continue to place live items in the folder:

If you manually replace the contents of the the files Studio will not be aware of this.

  1. Studio will continue to put future deployments in the folder as normal.

  2. Studio will transfer to the deployment receiver whatever version is in that folder.

  3. If you add content to the folder that Studio has not been instructed to deploy, it will not transfer the file.

Here is a bit more information on deployment mechanics and troubleshooting: http://docs.craftercms.org/en/latest/system-administrators/debugging-deployment.html