From 2616a51af0ed80c62b174c1648c4466fc34739a5 Mon Sep 17 00:00:00 2001 From: Daniel Pierce Date: Tue, 29 Aug 2023 13:15:46 -0400 Subject: [PATCH] Use dedicated lock files for dassie/koppie 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. --- .dassie/.env | 1 + .dassie/Gemfile.dassie | 2 ++ .gitignore | 2 +- .koppie/.env | 1 + .koppie/Gemfile.koppie | 2 ++ Gemfile.dassie | 2 ++ Gemfile.koppie | 2 ++ docker-compose-koppie.yml | 1 + docker-compose.yml | 3 ++- 9 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 .dassie/Gemfile.dassie create mode 100644 .koppie/Gemfile.koppie create mode 100644 Gemfile.dassie create mode 100644 Gemfile.koppie diff --git a/.dassie/.env b/.dassie/.env index dc6ccf759a..9f13862102 100644 --- a/.dassie/.env +++ b/.dassie/.env @@ -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 diff --git a/.dassie/Gemfile.dassie b/.dassie/Gemfile.dassie new file mode 100644 index 0000000000..e8c1793638 --- /dev/null +++ b/.dassie/Gemfile.dassie @@ -0,0 +1,2 @@ +# Use dedicated lock files for dassie/koppie to avoid gem mismatches +eval_gemfile 'Gemfile' diff --git a/.gitignore b/.gitignore index be99985283..4dba5dd8df 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/.koppie/.env b/.koppie/.env index a5d9ae5479..d7b649332b 100644 --- a/.koppie/.env +++ b/.koppie/.env @@ -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 diff --git a/.koppie/Gemfile.koppie b/.koppie/Gemfile.koppie new file mode 100644 index 0000000000..e8c1793638 --- /dev/null +++ b/.koppie/Gemfile.koppie @@ -0,0 +1,2 @@ +# Use dedicated lock files for dassie/koppie to avoid gem mismatches +eval_gemfile 'Gemfile' diff --git a/Gemfile.dassie b/Gemfile.dassie new file mode 100644 index 0000000000..e8c1793638 --- /dev/null +++ b/Gemfile.dassie @@ -0,0 +1,2 @@ +# Use dedicated lock files for dassie/koppie to avoid gem mismatches +eval_gemfile 'Gemfile' diff --git a/Gemfile.koppie b/Gemfile.koppie new file mode 100644 index 0000000000..e8c1793638 --- /dev/null +++ b/Gemfile.koppie @@ -0,0 +1,2 @@ +# Use dedicated lock files for dassie/koppie to avoid gem mismatches +eval_gemfile 'Gemfile' diff --git a/docker-compose-koppie.yml b/docker-compose-koppie.yml index 488904f792..40c5f1b485 100644 --- a/docker-compose-koppie.yml +++ b/docker-compose-koppie.yml @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 93fdf56e8d..91e2dcf843 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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