Skip to content
Snippets Groups Projects

Issue #3514737: initial Tugboat config

Files
3
+ 85
0
services:
php:
# Specify the version of Drupal you wish to use for Tugboat below.
image: tugboatqa/drupal:11
default: true
http: false
depends: mysql
commands:
update:
# Run various commands from the drupal/recommended-project root.
- |
set -eux
# This is an environment variable we added in the Dockerfile that
# provides the path to Drupal composer root (not the web root).
cd $DRUPAL_COMPOSER_ROOT
# Configure composer to require this module as a symlink.
composer config minimum-stability dev
composer config repositories.tugboat path $TUGBOAT_ROOT
composer require \
drupal/civictheme \
drupal/default_content \
drupal/experience_builder \
drupal/components
# Install Drupal on the site.
rm -f $DRUPAL_DOCROOT/sites/default/settings.php
php -d memory_limit=-1 \
vendor/bin/drush.php \
--yes \
--db-url=mysql://tugboat:tugboat@mysql:3306/tugboat \
--site-name="Live preview for ${TUGBOAT_PREVIEW_NAME}" \
--account-pass=admin \
site:install standard
# Require settings.local.php increase CLI memory limit, add trusted
# host patterns, and allow for enabling hidden xb_dev_standard module.
echo "require_once '$TUGBOAT_ROOT/.tugboat/settings.local.php';" >> $DOCROOT/sites/default/settings.php
# Set up the files directory permissions.
mkdir -p $DRUPAL_DOCROOT/sites/default/files
chgrp -R www-data $DRUPAL_DOCROOT/sites/default/files
chmod 2775 $DRUPAL_DOCROOT/sites/default/files
chmod -R g+w $DRUPAL_DOCROOT/sites/default/files
# Enable the module.
vendor/bin/drush --yes pm:install \
components \
default_content \
experience_builder \
media_library \
xb_dev_standard
# Enable starshot_demo theme.
vendor/bin/drush --yes theme:enable starshot_demo
vendor/bin/drush --yes config:set system.theme default starshot_demo
# Create node/1
vendor/bin/drush scr $TUGBOAT_ROOT/.tugboat/create-article-node.php
build:
# Update Drupal core composer packages and run any Drupal updates.
- |
set -eux
cd $DRUPAL_COMPOSER_ROOT
composer install --optimize-autoloader
# Update packages and dependencies.
composer update --with-all-dependencies \
drupal/civictheme \
drupal/default_content \
drupal/components \
drupal/experience_builder
# Run Drupal updates
vendor/bin/drush --yes updb
vendor/bin/drush cache:rebuild
# Ensure web user can access theme files.
- chgrp -R www-data .
# Warm Drupal caches
- 'curl --silent --header "Host: $TUGBOAT_DEFAULT_SERVICE_URL_HOST" http://localhost > /dev/null'
mysql:
image: tugboatqa/mariadb
Loading