Skip to content

Commit

Permalink
Merge pull request #352 from jhu-idc/tm-site-settings-and-startup-fixes
Browse files Browse the repository at this point in the history
TM site settings fix, remove solr reindexing and other startup fixes
  • Loading branch information
springstim authored Nov 29, 2022
2 parents cb0e20e + c405404 commit b2db038
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ COPY --chown=nginx:www-data codebase /var/www/drupal/
COPY --chown=0:0 rootfs /

RUN COMPOSER_MEMORY_LIMIT=-1 COMPOSER_DISCARD_CHANGES=true composer install --no-interaction --no-progress && \
find /var/www/drupal/vendor \! -user nginx -exec chown -v nginx:www-data {} \; && \
chmod 0750 /var/www/drupal/fix_permissions.sh && \
/var/www/drupal/fix_permissions.sh /var/www/drupal/web nginx
/var/www/drupal/fix_permissions.sh /var/www/drupal/web nginx && \
composer clearcache

11 changes: 0 additions & 11 deletions codebase/web/sites/default/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -792,14 +792,3 @@
if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
include $app_root . '/' . $site_path . '/settings.local.php';
}
$settings['config_sync_directory'] = '/var/www/drupal/config/sync';
$settings['flysystem']['fedora']['driver'] = 'fedora';
$settings['flysystem']['fedora']['config']['root'] = 'http://fcrepo.isle-dc.localhost/fcrepo/rest/';
$databases['default']['default']['database'] = 'drupal_default';
$databases['default']['default']['username'] = 'drupal_default';
$databases['default']['default']['password'] = 'password';
$databases['default']['default']['host'] = 'mariadb-idc.traefik.me';
$databases['default']['default']['port'] = '3306';
$databases['default']['default']['prefix'] = '';
$databases['default']['default']['driver'] = 'mysql';
$databases['default']['default']['namespace'] = 'Drupal\\Core\\Database\\Driver\\mysql';
19 changes: 12 additions & 7 deletions rootfs/etc/cont-init.d/999-startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,21 @@ echo " -------------------------------------------------------------------------
echo ""

DRUPAL_DIR=/var/www/drupal
CHOWN="/bin/chown"
CHMOD="/bin/chmod"
MKDIR="/bin/mkdir"

#find "${DRUPAL_DIR}/vendor" \! -user nginx -exec $CHOWN nginx:www-data {} \;

$CHMOD 0750 $DRUPAL_DIR/fix_permissions.sh

echo "Creating tmp and private directories"
for d in $DRUPAL_DIR/web/sites/default/files/tmp /tmp/private ; do
echo " directory: '$d'"
mkdir -m 0775 -p "$d"
chown -R nginx:nginx "$d"
$MKDIR -m 0775 -p "$d"
$CHOWN -R nginx:nginx "$d"
done

chmod 0750 $DRUPAL_DIR/fix_permissions.sh
$DRUPAL_DIR/fix_permissions.sh $DRUPAL_DIR/web nginx

# This is a workaround for a bug.
Expand All @@ -26,16 +32,15 @@ drush sql-query "DELETE FROM key_value WHERE collection='system.schema' AND name
drush php-eval "\Drupal::keyValue('system.schema')->delete('remote_stream_wrapper')" || true
drush php-eval "\Drupal::keyValue('system.schema')->delete('matomo')" || true

drush config:import -y

# Fix for Github runner "the input device is not a TTY" error
drush search-api-solr:install-missing-fieldtypes || true
drush search-api:rebuild-tracker || true
drush search-api-solr:finalize-index || true
drush search-api:index || true

# Cleanup
echo "Clean theme-registry..."
drush cc theme-registry

echo "Status..."
drush -d status

CURRENT_VERSION=$(drush cr && drush core-status --fields=drupal-version | cut -d\: -f2 | sed 's/ //g')
Expand Down

0 comments on commit b2db038

Please sign in to comment.