diff --git a/demo/rootfs/etc/cont-init.d/04-demo-setup.sh b/demo/rootfs/etc/cont-init.d/04-demo-setup.sh index 2e7666d4..da61f29d 100755 --- a/demo/rootfs/etc/cont-init.d/04-demo-setup.sh +++ b/demo/rootfs/etc/cont-init.d/04-demo-setup.sh @@ -33,7 +33,6 @@ function main { ) local features=( islandora_core_feature - controlled_access_terms_defaults islandora_defaults islandora_search ) diff --git a/drupal/Dockerfile b/drupal/Dockerfile index 02f6d7ae..fe45948d 100644 --- a/drupal/Dockerfile +++ b/drupal/Dockerfile @@ -1,6 +1,11 @@ # syntax=docker/dockerfile:experimental FROM local/nginx:latest +RUN --mount=type=cache,target=/var/cache/apk \ + apk-install.sh \ + patch && \ + cleanup.sh + RUN --mount=id=downloads,type=cache,target=/opt/downloads \ DOWNLOAD_CACHE_DIRECTORY="/opt/downloads" && \ DRUSH_VERSION="0.6.0" && \ diff --git a/drupal/rootfs/etc/islandora/utilities.sh b/drupal/rootfs/etc/islandora/utilities.sh index e7650320..bb25495e 100755 --- a/drupal/rootfs/etc/islandora/utilities.sh +++ b/drupal/rootfs/etc/islandora/utilities.sh @@ -68,11 +68,18 @@ function wait_for_service { # Waits for services that are required to be running to successfully ingest content. function wait_for_required_services { local site="${1}"; shift - wait_for_service "${site}" "SOLR" - wait_for_service "${site}" "FCREPO" - wait_for_service "${site}" "BROKER" - wait_for_service "${site}" "GEMINI" - wait_for_service "${site}" "TRIPLESTORE" + if [ $# -gt 0 ]; then + while [ $# -gt 0 ]; do + local service="${1}"; shift + wait_for_service "${site}" "${service}" + done + else + wait_for_service "${site}" "SOLR" + wait_for_service "${site}" "FCREPO" + wait_for_service "${site}" "BROKER" + wait_for_service "${site}" "GEMINI" + wait_for_service "${site}" "TRIPLESTORE" + fi } # Apply given function for all sites in parallel, up to the number of cores available. diff --git a/drupal/rootfs/usr/share/drush/Commands/UpdateSettingsCommands.php b/drupal/rootfs/usr/share/drush/Commands/UpdateSettingsCommands.php index d4d814d9..1b4acbe5 100644 --- a/drupal/rootfs/usr/share/drush/Commands/UpdateSettingsCommands.php +++ b/drupal/rootfs/usr/share/drush/Commands/UpdateSettingsCommands.php @@ -156,6 +156,25 @@ public function setDatabaseSettings( $this->writeSettings($settings); } + /** + * Set `trusted_host_patterns` in settings.php + * + * @command islandora:settings:set-trusted-host-patterns + * @bootstrap site + * @param $patterns List of comma, separated patterns. + * @usage drush islandora:settings:set-trusted-host-patterns "^localhost$,^192\\.168\\.00\\.52$,^127\\.0\\.0\\.1$" + * Sets `trusted_host_patterns` in settings.php. + * Be aware that shell escaping can have an affect on the arguments. + */ + public function setTrustedHostPatterns($patterns) + { + $settings['settings']['trusted_host_patterns'] = (object) [ + 'value' => explode(',', $patterns), + 'required' => TRUE, + ]; + $this->writeSettings($settings); + } + /** * Determine which settings file to update. */ diff --git a/fcrepo/rootfs/etc/confd/templates/allowed-external-content.txt.tmpl b/fcrepo/rootfs/etc/confd/templates/allowed-external-content.txt.tmpl index 5b0bb6d2..d99f9fb5 100644 --- a/fcrepo/rootfs/etc/confd/templates/allowed-external-content.txt.tmpl +++ b/fcrepo/rootfs/etc/confd/templates/allowed-external-content.txt.tmpl @@ -1,3 +1,2 @@ http://drupal/ -{{ range gets "/allow/external/*" }}{{.Value}} -{{ end }} +{{ range gets "/allow/external/*" }}{{.Value}}{{ end }} diff --git a/tomcat/rootfs/etc/confd/conf.d/tomcat-users.toml b/tomcat/rootfs/etc/confd/conf.d/tomcat-users.toml index 196ecdde..99415ce4 100644 --- a/tomcat/rootfs/etc/confd/conf.d/tomcat-users.toml +++ b/tomcat/rootfs/etc/confd/conf.d/tomcat-users.toml @@ -3,4 +3,4 @@ src = "tomcat-users.xml.tmpl" dest = "/opt/tomcat/conf/tomcat-users.xml" uid = 100 gid = 1000 -keys = ["/tomcat/admin/user", "/tomcat/admin/password"] +keys = ["/tomcat/admin/user", "/tomcat/admin/password", "/tomcat/admin/roles"]