Skip to content

Commit

Permalink
Use dedicated lock files for dassie/koppie
Browse files Browse the repository at this point in the history
Tries to avoid mismatches between the image's installed gems and the lock file by not sharing the same Gemfile.lock in different contexts.
Causes bundler in docker compose to create and use Gemfile.dassie.lock or Gemfile.koppie.lock, leaving the regular Gemfile.lock for host system use.
  • Loading branch information
dlpierce authored and dunn committed Aug 29, 2023
1 parent d731b4b commit 2616a51
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 2 deletions.
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'
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'
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'
1 change: 1 addition & 0 deletions docker-compose-koppie.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ services:
args:
- EXTRA_APK_PACKAGES=git less chromium
- APP_PATH=.koppie
- BUNDLE_GEMFILE=Gemfile.koppie
image: ghcr.io/samvera/koppie
command: sh -c 'bundle exec puma -v -b tcp://0.0.0.0:3000'
stdin_open: true
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ 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 exec puma -v -b tcp://0.0.0.0:3000'
stdin_open: true
Expand Down

0 comments on commit 2616a51

Please sign in to comment.