michaelmcandrew / civicrm-buildkit-docker

This is a read only copy. Please make PRs here: https://lab.civicrm.org/michaelmcandrew/civicrm-buildkit-docker
https://lab.civicrm.org/michaelmcandrew/civicrm-buildkit-docker
GNU Affero General Public License v3.0
40 stars 31 forks source link

Question: why have different volumes for the caches? #23

Closed jaapjansma closed 5 years ago

jaapjansma commented 6 years ago

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?

michaelmcandrew commented 6 years ago

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.

jaapjansma commented 6 years ago

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.

michaelmcandrew commented 6 years ago

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.

jaapjansma commented 6 years ago

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

michaelmcandrew commented 6 years ago

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.

jaapjansma commented 6 years ago

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

michaelmcandrew commented 6 years ago

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

michaelmcandrew commented 5 years ago

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.

michaelmcandrew commented 5 years ago

closing for now...