@@ -23,14 +23,13 @@ DB_URL="${DB_DRIVER}://${DB_USER}:${DB_PASSWORD}@${DB_HOST}/${DB_NAME}"
2323make init -f /usr/local/bin/actions.mk
2424
2525composer require -n \
26- drupal/redis
27- # \
28- # drupal/purge \
29- # drupal/varnish_purge
26+ drupal/redis \
27+ drupal/purge \
28+ drupal/varnish_purge
3029
31- # composer require -n \
32- # drupal/search_api \
33- # drupal/search_api_solr:~4
30+ composer require -n \
31+ drupal/search_api \
32+ drupal/search_api_solr:~ 4
3433
3534cd ./web
3635
@@ -50,51 +49,49 @@ check_rq "PHP" "${PHP_VERSION}"
5049check_rq " File system" " Writable"
5150check_rq " Configuration files" " Protected"
5251
53- # # @todo: also uncomment in test.settings.php
54- # drush en -y \
55- # redis
56- # # \
57- # # purge \
58- # # purge_queuer_coretags \
59- # # purge_drush \
60- # # varnish_purger \
61- # # varnish_purge_tags
52+ drush en -y \
53+ redis \
54+ purge \
55+ purge_queuer_coretags \
56+ purge_drush \
57+ varnish_purger \
58+ varnish_purge_tags
6259
63- # drush en -y search_api_solr_admin
60+ drush en -y search_api_solr_admin
6461
6562chmod 755 " ${PWD} /sites/default/settings.php"
6663echo " include '${PWD} /sites/default/test.settings.php';" >> " ${PWD} /sites/default/settings.php"
6764
6865# # Enable redis
6966check_rq " Redis" " Connected"
7067
71- # check_rq "Trusted Host Settings" "Enabled"
68+ check_rq " Trusted Host Settings" " Enabled"
7269
7370# Import solr server
74- # drush cim --source=/var/www/html/solr --partial -y
75- # drush solr-upload-conf solr 1
76- # drush sapi-sl | grep -q enabled
71+ drush cim --source=/var/www/html/solr --partial -y
72+ drush solr-upload-conf solr
73+ drush sapi-sl | grep -q enabled
7774
7875# # Test varnish cache and purge
79- # drush ppadd varnish
80- # drush cr
76+ drush ppadd varnish
77+ drush cr
8178
8279# # Workaround for varnish purger import https://www.drupal.org/node/2856221
83- # PURGER_ID=$(drush ppls --format=json | jq -r "keys[0]")
84- #
85- # mkdir -p /var/www/html/varnish
86- # # We copy mounted file because we can't edit mounted file (resource busy error).
87- # cp /var/www/html/varnish-purger.yml /var/www/html/varnish/purger.yml
88- # sed -i "s/PLUGIN_ID/${PURGER_ID}/g" /var/www/html/varnish/purger.yml
89- # mv /var/www/html/varnish/purger.yml "/var/www/html/varnish/varnish_purger.settings.${PURGER_ID}.yml"
90- # drush -y cim --source=/var/www/html/varnish --partial
91- # drush -y config-set system.performance cache.page.max_age 43200
92- #
93- # curl -Is -H 'Host: drupal.localhost' varnish:6081 | grep -q "X-VC-Cache: MISS"
94- # curl -Is -H 'Host: drupal.localhost' varnish:6081 | grep -q "X-VC-Cache: HIT"
95- #
96- # drush cc render
97- # drush pqw
98- #
99- # curl -Is -H 'Host: drupal.localhost' varnish:6081 | grep -q "X-VC-Cache: MISS"
100- # curl -Is -H 'Host: drupal.localhost' varnish:6081 | grep -q "X-VC-Cache: HIT"
80+ PURGER_ID=$( drush ppls --format=json | jq -r " keys[0]" )
81+
82+ mkdir -p /var/www/html/varnish
83+ # We copy mounted file because we can't edit mounted file (resource busy error).
84+ cp /var/www/html/varnish-purger.yml /var/www/html/varnish/purger.yml
85+ sed -i " s/PLUGIN_ID/${PURGER_ID} /g" /var/www/html/varnish/purger.yml
86+ mv /var/www/html/varnish/purger.yml " /var/www/html/varnish/varnish_purger.settings.${PURGER_ID} .yml"
87+ drush -y cim --source=/var/www/html/varnish --partial
88+ drush -y config-set system.performance cache.page.max_age 43200
89+
90+ curl -Is -H ' Host: drupal.localhost' varnish:6081 | grep -q " X-VC-Cache: MISS"
91+ curl -Is -H ' Host: drupal.localhost' varnish:6081 | grep -q " X-VC-Cache: HIT"
92+
93+ drush cc render
94+ drush pqw
95+
96+ curl -Is -H ' Host: drupal.localhost' varnish:6081 | grep -q " X-VC-Cache: MISS"
97+ curl -Is -H ' Host: drupal.localhost' varnish:6081 | grep -q " X-VC-Cache: HIT"
0 commit comments