telus-agcg / nib

A Docker Compose wrapper geared towards Ruby/Rails development with a focus on: convention, convenience and productivity.
MIT License
15 stars 3 forks source link

Consider providing ability to override volume mount default behavior #167

Open scotthelm opened 2 years ago

scotthelm commented 2 years ago

For larger projects or mono-repos containing many directories that have self-contained functionality, it would be nice to have a way to specify which director(y|ies) to load. This would potentially decrease the amount of files that must be mounted into the container, required or imported by interpreted languages such as ruby or python, and therefore decrease the startup-time of the container. Perhaps something like nib run-dir <list/of, paths/to/load> <service-name>

johnallen3d commented 2 years ago

I like the idea of improving developer workflow (e.g. performance) in projects like you describe. Before we try to implement a feature here though, I wonder if it's worth considering an approach like what's described in this post.

https://iwpnd.pw/articles/2021-05/docker-compose-in-monorepos

tl;dr — have a top-level docker-compose.yml that defines the shared services (e.g. databases) and a docker-compose.yml in each component directory that extends the parent to pull in the db's.