From 4538ab38976d350e76244d73202eab16538d3e7f Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Wed, 20 Dec 2023 08:50:54 -0800 Subject: [PATCH] add note about running base container, make sure initialize_app is bundled to catch the override before running migrations --- db-migrate-seed.sh | 1 + docker-compose.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/db-migrate-seed.sh b/db-migrate-seed.sh index eeecf94..6e8b081 100755 --- a/db-migrate-seed.sh +++ b/db-migrate-seed.sh @@ -10,6 +10,7 @@ db-wait.sh "$SOLR_HOST:$SOLR_PORT" migrations_run=`PGPASSWORD=$DB_PASSWORD psql -h $DB_HOST -U $DB_USER $DB_NAME -t -c "SELECT version FROM schema_migrations ORDER BY schema_migrations" | wc -c` migrations_fs=`ls -l db/migrate/ | awk '{print $9}' | grep -o '[0-9]\+' | wc -c` if [[ "$migrations_run" -lt "$migrations_fs" ]]; then + bundle bundle exec rails db:create bundle exec rails db:migrate bundle exec rails db:seed diff --git a/docker-compose.yml b/docker-compose.yml index 1f39cd4..cd5c63c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -62,6 +62,7 @@ services: file: hyrax-webapp/docker-compose.yml service: base image: ghcr.io/samvera/hyku/base:${TAG:-latest} + command: bash -l -c "echo 'base is only used for building base images, which in turn reduces image build times. It does not need to be run'" web: <<: *app