Commit 805f099d authored by Yas Naoi's avatar Yas Naoi
Browse files

Issue #3262412 by yas: Refactor .tugboat/config.yml

parent 4729885d
Loading
Loading
Loading
Loading
+20 −7
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ services:
    image: q0rban/tugboat-drupal:latest
    default: true
    http: false
    depends: mysql
    # depends: mysql
    commands:
      update: |
        set -eux
@@ -19,13 +19,18 @@ services:
        # We configure the Drupal project to use the checkout of the module as a
        # Composer package repository.
        composer config repositories.tugboat vcs $TUGBOAT_ROOT
        # Now we can require this module, specifing the branch name we created
        # Require Admin Toolbar
        composer require drupal/admin_toolbar
        # Require Bootstrap Cloud theme
        composer require drupal/bootstrap_cloud
        # Now we can require drupal/cloud, specifing the branch name we created
        # above that uses the $TUGBOAT_REPO_ID environment variable.
        composer require drupal/cloud:dev-$TUGBOAT_REPO_ID
        # Install Drupal on the site.
        # Use --db-url=mysql://tugboat:tugboat@mysql:3306/tugboat for mysql connection.
        vendor/bin/drush \
          --yes \
          --db-url=mysql://tugboat:tugboat@mysql:3306/tugboat \
          --db-url=sqlite://sites/default/files/db.sqlite \
          --site-name="Live preview for ${TUGBOAT_PREVIEW_NAME}" \
          --account-pass=admin \
          site:install standard
@@ -36,6 +41,12 @@ services:
        chmod -R g+w $DRUPAL_DOCROOT/sites/default/files
        # Enable the module.
        vendor/bin/drush --yes pm:enable cloud aws_cloud cloud_cluster_worker docker gapps k8s openstack terraform vmware
        # Enable admin_toolbar Module.
        vendor/bin/drush --yes en admin_toolbar
        # Enable the theme.
        vendor/bin/drush --yes theme:enable bootstrap_cloud
        vendor/bin/drush --yes config:set system.theme default bootstrap_cloud
        vendor/bin/drush --yes config:set system.theme admin claro
      build: |
        set -eux
        # Delete and re-check out this branch in case this is built from a Base Preview.
@@ -43,9 +54,11 @@ services:
        export COMPOSER_MEMORY_LIMIT=-1
        cd $DRUPAL_COMPOSER_ROOT
        composer install --optimize-autoloader
        # Update this module, including all dependencies.
        composer update drupal/cloud --with-all-dependencies
        # Update installed modules.
        composer update drupal/admin_toolbar
        composer update drupal/bootstrap_cloud
        composer update drupal/cloud
        vendor/bin/drush --yes updb
        vendor/bin/drush cache:rebuild
  mysql:
    image: tugboatqa/mariadb
  # mysql:
  #   image: tugboatqa/mariadb