Skip to content

Commit

Permalink
Merge branch 'islandora_lite' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
kylehuynh205 authored Oct 3, 2023
2 parents 2bcd55f + f75aa16 commit d20d9b3
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 4 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ Additionally, there's a couple other targets derived from `local` which make use
On top of that, there's a lot of useful commands for managing an Islandora instance, such
as database import/export and reindexing.

## Islandora Lite (New)

- **lite_dev**: Creates a clone of the starter site project, intended for development of the "Islandora Lite".

````
make lite_dev
````

## Requirements

- Desktop / laptop / VM (*Docker must have sufficient resources to run GNU Make*)
Expand Down
60 changes: 60 additions & 0 deletions custom.Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
.PHONY: lite-init
lite-init: generate-secrets
$(MAKE) download-default-certs
$(MAKE) -B docker-compose.yml
$(MAKE) pull
mkdir -p $(CURDIR)/codebase

.PHONY: run-lite-migrations
## Runs migrations of islandora
.SILENT: run-lite-migrations
run-lite-migrations:
#docker-compose exec -T drupal with-contenv bash -lc "for_all_sites import_islandora_migrations"
# this line can be reverted when https://github.com/Islandora-Devops/isle-buildkit/blob/fae704f065435438828c568def2a0cc926cc4b6b/drupal/rootfs/etc/islandora/utilities.sh#L557
# has been updated to match
docker-compose exec -T drupal with-contenv bash -lc 'drush -l $(SITE) migrate:import islandora_tags'

.PHONY: lite_hydrate
.SILENT: lite_hydrate
## Reconstitute the site from environment variables.
lite_hydrate: update-settings-php update-config-from-environment solr-cores namespaces run-lite-migrations
docker-compose exec -T drupal drush cr -y

.PHONY: lite_dev
## Make a local site with codebase directory bind mounted, using cloned starter site.
lite_dev: QUOTED_CURDIR = "$(CURDIR)"
lite_dev: generate-secrets
$(MAKE) lite-init ENVIRONMENT=local
if [ -z "$$(ls -A $(QUOTED_CURDIR)/codebase)" ]; then \
docker container run --rm -v $(CURDIR)/codebase:/home/root $(REPOSITORY)/nginx:$(TAG) with-contenv bash -lc 'git clone -b config_sync_context https://github.com/digitalutsc/islandora-sandbox.git /home/root;'; \
fi
$(MAKE) set-files-owner SRC=$(CURDIR)/codebase ENVIRONMENT=local
docker-compose up -d --remove-orphans

# install imagemagick plugin
docker-compose exec -T drupal apk --update add imagemagick
docker-compose exec -T drupal apk add php7-imagick
docker-compose restart drupal

# install ffmpeg needed to create TNs
docker-compose exec -T drupal apk --update add ffmpeg
-docker-compose exec -T drupal drush -y config:set media_thumbnails_video.settings ffmpeg /usr/bin/ffmpeg
-docker-compose exec -T drupal drush -y config:set media_thumbnails_video.settings ffprobe /usr/bin/ffprobe
docker-compose restart drupal

# create private file directory
docker-compose exec -T drupal mkdir -p $(CURDIR)/codebase/web/sites/default/private_files

# install the site
docker-compose exec -T drupal with-contenv bash -lc 'composer install'
$(MAKE) lite-finalize ENVIRONMENT=local

.PHONY: lite-finalize
lite-finalize:
docker-compose exec -T drupal with-contenv bash -lc 'chown -R nginx:nginx .'
$(MAKE) drupal-database update-settings-php
docker-compose exec -T drupal with-contenv bash -lc "drush si -y --existing-config minimal --account-pass '$(shell cat secrets/live/DRUPAL_DEFAULT_ACCOUNT_PASSWORD)'"
docker-compose exec -T drupal with-contenv bash -lc "drush -l $(SITE) user:role:add administrator admin"
MIGRATE_IMPORT_USER_OPTION=--userid=1 $(MAKE) lite_hydrate
$(MAKE) login

10 changes: 6 additions & 4 deletions sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@ EXPOSE_FEDORA=true
FEDORA_PORT=8081

# Expose Blazegraph over the given port - DO NOT EXPOSE THIS IN PRODUCTION
EXPOSE_BLAZEGRAPH=false
EXPOSE_BLAZEGRAPH=true
BLAZEGRAPH_PORT=8082

# Expose Activemq over the given port - DO NOT EXPOSE THIS IN PRODUCTION
EXPOSE_ACTIVEMQ=false
ACTIVEMQ_PORT=8161

# Expose SOLR over the given port - DO NOT EXPOSE THIS IN PRODUCTION
EXPOSE_SOLR=false
EXPOSE_SOLR=true
SOLR_PORT=8983

# Expose Code Server over the given port - DO NOT EXPOSE THIS IN PRODUCTION
Expand Down Expand Up @@ -194,9 +194,11 @@ TRAEFIK_MEMORY_LIMIT=8G
WATCHTOWER_MEMORY_LIMIT=2G

# Configuration to enable the custom delegate script for Cantaloupe
CANTALOUPE_DELEGATE_SCRIPT_ENABLED=false
CANTALOUPE_DELEGATE_SCRIPT_ENABLED=true
CANTALOUPE_DELEGATE_SCRIPT_PATHNAME=/opt/tomcat/bin/delegates.rb
CANTALOUPE_HTTPSOURCE_LOOKUP_STRATEGY=BasicLookupStrategy

CANTALOUPE_HTTPSOURCE_LOOKUP_STRATEGY=ScriptLookupStrategy
CANTALOUPE_HTTPS_URCE_LOOKUP_STRATEGY=ScriptLookupStrategy

# Path to include in tar file for exported public files
# If set to . the files will be exported wherever you specify as DEST
Expand Down

0 comments on commit d20d9b3

Please sign in to comment.