⚙️ Add bundle as part of docker-compose #2006
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In working on a new HykuKnapsack, I encountered a problem where the
db-migrate-seed.sh
attempted to callbundle exec rails db:create
andthe command failed because
rails
was not installed.With this change, we'll ensure that we run
bundle
each time weinitialize the application. With newer versions of bundler that appears
to be a relatively fast command (a few seconds). In doing so, we ensure
that the first time we bring up the docker environment, we are building
those dependencies. (Note: When we build those dependencies, it will
take longer than a few seconds, but going forward those should be cached)
A word of caution, if you observe that this addition adds several
minutes to your Hyku build, we need to revisit this approach. In prior
versions of bundler, we've observed that adding bundle as part of the
build would typically add 2 to 4 minutes each time you run
docker compose up
.Related to: