diff --git a/.tugboat/config.yml b/.tugboat/config.yml new file mode 100644 index 00000000..a01d1c27 --- /dev/null +++ b/.tugboat/config.yml @@ -0,0 +1,38 @@ +# https://docs.tugboatqa.com/reference/tugboat-configuration/ +# https://docs.tugboatqa.com/starter-configs/tutorials/drupal-10/ +services: + webserver: + image: tugboatqa/php:8.3-apache + default: true + commands: + init: + - docker-php-ext-install opcache + - a2enmod headers rewrite + - echo "memory_limit = -1" >> /usr/local/etc/php/conf.d/my-php.ini + - ln -snf "${TUGBOAT_ROOT}/web" "${DOCROOT}" + build: + - composer install + - composer run drupal:install + + # Make sure files and translations folders exist and are writable. + - mkdir -p "${DOCROOT}/sites/default/files/translations" + - chgrp -R www-data "${DOCROOT}/sites/default/files" + - find "${DOCROOT}/sites/default/files" -type d -exec chmod 2775 {} \; + - find "${DOCROOT}/sites/default/files" -type f -exec chmod 0664 {} \; + + # Enable verbose error logging (debug mode). + - ./vendor/bin/drush config:set --yes system.logging error_level verbose + - ./vendor/bin/drush config:get system.logging error_level + + # @todo The above Drush command doesn't ultimately take effect + # for some reason. Manually change the settings until it can + # be debugged. + - | + echo "if (file_exists(__DIR__ . '/settings.local.php')) { + include __DIR__ . '/settings.local.php'; + }" | sudo tee -a web/sites/default/settings.php + sudo cp web/sites/example.settings.local.php \ + web/sites/default/settings.local.php + + # Make everything writable. + - sudo chmod -R 777 "${DOCROOT}"