Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into secrets
  • Loading branch information
dannylamb committed Oct 15, 2020
2 parents cdd99a3 + 1f297ff commit 7482dd0
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 9 deletions.
1 change: 0 additions & 1 deletion demo/rootfs/etc/cont-init.d/04-demo-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ function main {
)
local features=(
islandora_core_feature
controlled_access_terms_defaults
islandora_defaults
islandora_search
)
Expand Down
5 changes: 5 additions & 0 deletions drupal/Dockerfile
Original file line number Diff line number Diff line change
@@ -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" && \
Expand Down
17 changes: 12 additions & 5 deletions drupal/rootfs/etc/islandora/utilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
19 changes: 19 additions & 0 deletions drupal/rootfs/usr/share/drush/Commands/UpdateSettingsCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
http://drupal/
{{ range gets "/allow/external/*" }}{{.Value}}
{{ end }}
{{ range gets "/allow/external/*" }}{{.Value}}{{ end }}
2 changes: 1 addition & 1 deletion tomcat/rootfs/etc/confd/conf.d/tomcat-users.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 7482dd0

Please sign in to comment.