From 0f52a8dd136455203de6cecd5aae3ad5324fb5df Mon Sep 17 00:00:00 2001 From: Tim Martin Date: Mon, 28 Nov 2022 10:07:41 -0700 Subject: [PATCH 1/3] remove extraneous static config from sites/default/settings.php --- codebase/web/sites/default/settings.php | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/codebase/web/sites/default/settings.php b/codebase/web/sites/default/settings.php index a4175a560..2401f9497 100644 --- a/codebase/web/sites/default/settings.php +++ b/codebase/web/sites/default/settings.php @@ -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'; From 1040d56d1411aaa00e7c0040a98de0e878ce13db Mon Sep 17 00:00:00 2001 From: Tim Martin Date: Tue, 29 Nov 2022 13:28:18 -0700 Subject: [PATCH 2/3] add composer cleanup to Dockerfile --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2409f36ec..5fde43cb8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 From c405404095e1a7526283b5fd287f49934ddcd921 Mon Sep 17 00:00:00 2001 From: Tim Martin Date: Tue, 29 Nov 2022 13:29:13 -0700 Subject: [PATCH 3/3] remove solr reindexing etc. from container startup --- rootfs/etc/cont-init.d/999-startup.sh | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/rootfs/etc/cont-init.d/999-startup.sh b/rootfs/etc/cont-init.d/999-startup.sh index b06ebd0f4..f29ab1d97 100644 --- a/rootfs/etc/cont-init.d/999-startup.sh +++ b/rootfs/etc/cont-init.d/999-startup.sh @@ -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. @@ -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')