michaelmcandrew/civicrm-buildkit-docker

Question: why have different volumes for the caches?

Closed this issue · 9 comments

Each cache (e.g. git, drush, bower etc) gets mounted under /buildkit
But /buildkit it self is also a volume. So why have different volumes for each cache?

hey @jaapjansma, good question :)

I can't remember the exact reasoning. I think the general principle I was following was identify what NEEDS to be mounted as as volume and only mount that, leaving the rest to be read directly from the container. Why? Because 1) reading from the container is quicker, and 2) less caching is less to get out of sync when you update the container.

Given the above, I am not sure why I mounted /buildkit as well. Either it was a mistake, or something wasn't working without it.

Buildkit contains some configurations of the sites created, those configurations need to be persisted after starting/stoping a container. So my assumption is that you did mount buildkit for this purpose.

Buildkit contains some configurations of the sites created

What config are you talking about in particular? The amp config is in this volume: https://github.com/michaelmcandrew/civicrm-buildkit-docker/blob/master/docker-compose.yml#L19. Off the top of my head, I can't think of any other config.

I am talking about the amp config indeed. So that is possibly the only one to keep

My suggestion would be to experiment with removing the buildkit volume but keeping all the others, since they are all specific and serve a purpose.

I have removed the buildkit volume and kept the others and it all works quite well.

same here :) worth merging in at some point...

you know what, there are other files in /buildkit like .bash_history and .mysql_history that are useful to persist.

Given the amount of command line work that people typically do with buildkit (and the various misc. artefacts that might be produced as a result) I am now feeling less inclined to remove it.

closing for now...