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

dev-docker: only run bundle/yarn during build #6237

Merged
merged 5 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ jobs:
VALKYRIE_SOLR_CORE: valkyrie-test
VALKYRIE_SOLR_PORT: 8985
steps:
- run:
name: yarn
command: cd /app/samvera/hyrax-engine && yarn
- run:
name: Create solr core
command: |
Expand Down
1 change: 1 addition & 0 deletions .dassie/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ANALYTICS_START_DATE=2021-08-21
BUNDLE_GEMFILE=Gemfile.dassie
CHROME_HEADLESS_MODE=false
DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true
DATABASE_TEST_URL=postgresql://hyrax_user:hyrax_password@postgres/hyrax_test?pool=5
Expand Down
2 changes: 2 additions & 0 deletions .dassie/Gemfile.dassie
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Use dedicated lock files for dassie/koppie to avoid gem mismatches
eval_gemfile 'Gemfile'
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ chart/*

Gemfile.lock
.dassie/Gemfile.lock
.koppie/Gemfile.lock

node_modules/*
yarn.lock
yarn.lock
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
ruby-version
ruby-gemset
.rvmrc
Gemfile.lock
Gemfile*.lock

# don't push around data files (for dev envs only)
fcrepo4-data
Expand Down
1 change: 1 addition & 0 deletions .koppie/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
BUNDLE_GEMFILE=Gemfile.koppie
CHROME_HEADLESS_MODE=false
DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true
DATABASE_TEST_URL=postgresql://hyrax_user:hyrax_password@postgres/hyrax_test?pool=5
Expand Down
2 changes: 2 additions & 0 deletions .koppie/Gemfile.koppie
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Use dedicated lock files for dassie/koppie to avoid gem mismatches
eval_gemfile 'Gemfile'
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ COPY --chown=1001:101 . /app/samvera/hyrax-engine
RUN bundle -v && \
bundle install --jobs "$(nproc)" && \
cd $HYRAX_ENGINE_PATH && \
bundle install --jobs "$(nproc)"
bundle install --jobs "$(nproc)" && \
yarn

RUN RAILS_ENV=production SECRET_KEY_BASE='fakesecret1234' DB_ADAPTER=nulldb DATABASE_URL='postgresql://fake' bundle exec rake assets:precompile


Expand Down
2 changes: 2 additions & 0 deletions Gemfile.dassie
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Use dedicated lock files for dassie/koppie to avoid gem mismatches
eval_gemfile 'Gemfile'
2 changes: 2 additions & 0 deletions Gemfile.koppie
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Use dedicated lock files for dassie/koppie to avoid gem mismatches
eval_gemfile 'Gemfile'
7 changes: 4 additions & 3 deletions docker-compose-koppie.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ services:
args:
- EXTRA_APK_PACKAGES=git less chromium
- APP_PATH=.koppie
- BUNDLE_GEMFILE=Gemfile.koppie
image: ghcr.io/samvera/koppie
command: sh -c 'bundle && yarn && bundle exec puma -v -b tcp://0.0.0.0:3000'
command: sh -c 'bundle exec puma -v -b tcp://0.0.0.0:3000'
stdin_open: true
tty: true
user: root
Expand Down Expand Up @@ -46,7 +47,7 @@ services:
args:
- APP_PATH=.koppie
image: ghcr.io/samvera/koppie-worker
command: sh -c 'bundle && bundle exec sidekiq'
command: sh -c 'bundle exec sidekiq'
user: root
env_file:
- .koppie/.env
Expand Down Expand Up @@ -78,7 +79,7 @@ services:
user: root
env_file:
- .koppie/.env
command: sh -c 'bundle && db-migrate-seed.sh'
command: db-migrate-seed.sh
depends_on:
- postgres
volumes:
Expand Down
9 changes: 5 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ services:
context: .
target: hyrax-engine-dev
args:
- EXTRA_APK_PACKAGES=git less chromium
- EXTRA_APK_PACKAGES=git less
- BUNDLE_GEMFILE=Gemfile.dassie
image: ghcr.io/samvera/dassie
command: sh -c 'bundle && bundle exec puma -v -b tcp://0.0.0.0:3000'
command: sh -c 'bundle exec puma -v -b tcp://0.0.0.0:3000'
stdin_open: true
tty: true
user: root
Expand Down Expand Up @@ -42,7 +43,7 @@ services:
context: .
target: hyrax-engine-dev-worker
image: ghcr.io/samvera/dassie-worker
command: sh -c 'bundle && bundle exec sidekiq'
command: sh -c 'bundle exec sidekiq'
user: root
env_file:
- .dassie/.env
Expand Down Expand Up @@ -73,7 +74,7 @@ services:
user: root
env_file:
- .dassie/.env
command: sh -c 'bundle && db-migrate-seed.sh'
command: db-migrate-seed.sh
depends_on:
- postgres
volumes:
Expand Down