.tugboat/config.yml
services:
# What to call the service hosting the site.
cardinalsites:
# Use PHP 7.2 with Apache
image: pookmish/tugboat:latest
# Set this as the default service. This does a few things
# 1. Clones the git repository into the service container
# 2. Exposes port 80 to the Tugboat HTTP proxy
# 3. Routes requests to the preview URL to this service
default: true
# Wait until the mysql service is done building
depends: mysql
# A set of commands to run while building this service
commands:
# Commands that set up the basic preview infrastructure
init:
- composer global require hirak/prestissimo
# Install drush-launcher
- wget -O /usr/local/bin/drush https://github.com/drush-ops/drush-launcher/releases/download/0.6.0/drush.phar
- chmod +x /usr/local/bin/drush
# Setup the directory.
- rm -rf /var/www/localhost
- mkdir -p /var/www/localhost/htdocs/profiles/
- cp ${TUGBOAT_ROOT}/.tugboat/composer.* /var/www/localhost/
- ln -snf ${TUGBOAT_ROOT} /var/www/localhost/htdocs/profiles/cardinal_service_profile
- cd /var/www/localhost/ && composer install --no-dev --no-interaction
- cd /var/www/localhost/ && composer update --no-dev --no-interaction
# Install Drupal
- cd /var/www/localhost/htdocs/ && drush si cardinal_service_profile --db-url=mysql://tugboat:tugboat@mysql/tugboat -y
- cd /var/www/localhost/htdocs/ && drush user:create tugboat --password=tugboat
- cd /var/www/localhost/htdocs/ && drush user:role:add administrator tugboat
- chmod -R 777 /var/www/localhost/htdocs/sites/default/files
# Commands that are run on base previews to create the new preview.
build:
# Install/update packages managed by composer.
- cd /var/www/localhost && composer update --no-dev --no-interaction
- cd /var/www/localhost/htdocs/ && drush updatedb
- cd /var/www/localhost/htdocs/ && drush config:import -y
- cd /var/www/localhost/htdocs/ && drush cache:rebuild
- cd /var/www/localhost/htdocs/ && drush pm:uninstall simplesamlphp_auth -y
# Collection of urls to compare visual results.
visualdiffs:
- /
- /people
- /resources
- /about
# What to call the service hosting MySQL. This name also acts as the
# hostname to access the service by from the php service.
mysql:
# Use the latest available 5.x version of MySQL
image: tugboatqa/mysql:5