Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚙️ Add bundle as part of docker-compose #2006

Merged
merged 2 commits into from
Oct 3, 2023

Conversation

jeremyf
Copy link
Contributor

@jeremyf jeremyf commented Oct 3, 2023

In working on a new HykuKnapsack, I encountered a problem where the
db-migrate-seed.sh attempted to call bundle exec rails db:create and
the command failed because rails was not installed.

With this change, we'll ensure that we run bundle each time we
initialize 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:

In working on a new HykuKnapsack, I encountered a problem where the
`db-migrate-seed.sh` attempted to call `bundle exec rails db:create` and
the command failed because `rails` was not installed.

With this change, we'll ensure that we run `bundle` each time we
initialize 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:

- #2004
@jeremyf jeremyf added the patch-ver for release notes label Oct 3, 2023
@jeremyf jeremyf merged commit d8117ad into adventist_dev Oct 3, 2023
5 of 6 checks passed
@jeremyf jeremyf deleted the add-bundle-to-initialize-app branch October 3, 2023 15:27
@kirkkwang kirkkwang mentioned this pull request Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch-ver for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants