Benji Fisher
August 4, 2020
git clone ...cd ...lando composer installlando blt setupgit clone ...cd ...composer installvagrant upvagrant sshblt setupgit clone https://gitlab.com/benjifisher/lando-gatsby-drupal.gitcd lando-gatsby-drupallando startLando Gatsby Drupal: https://gitlab.com/benjifisher/lando-gatsby-drupal
name: lando-gatsby-drupal
recipe: drupal8
config:
via: nginx
webroot: drupal/web
php: '7.4'
database: mariadb
services:
appserver:
build:
- cd drupal && composer install
run:
- echo "Install Drupal with drush."
- drupal/scripts/install.sh
nodejs:
type: node
ssl: true
globals:
gatsby-cli: "2.12.62"
yarn: "1.22.4"
run:
- echo "Installing Gatsby with yarn."
- cd gatsby && yarn install
appserver_nginx:
ssl: true
sslExpose: true
type: nginx
build_as_root:
- cp /app/conf/nginx/drupal.lgd.lndo.site.conf /opt/bitnami/nginx/conf/vhosts/.
- cp /app/conf/nginx/gatsbydrupal.lgd.lndo.site.conf /opt/bitnami/nginx/conf/vhosts/.
events:
post-start:
- nodejs: echo "Building the Gatsby site from Drupal."
- nodejs: cd gatsby && gatsby build
- nodejs: rm -rf gatsbydrupal/* && cp -R gatsby/public/* gatsbydrupal
proxy:
nodejs:
- gatsby.lgd.lndo.site:8000
appserver_nginx:
- drupal.lgd.lndo.site
- gatsbydrupal.lgd.lndo.site
tooling:
npm:
service: nodejs
node:
service: nodejs
gatsby:
service: nodejs
yarn:
service: nodejschromedriver for JS tests.agile.coop)name: drupal-contributions
recipe: drupal8
config:
webroot: web
services:
appserver:
run:
# @todo remove invocation of drupal-phpunit-upgrade again once https://www.drupal.org/project/drupal/issues/3099061 is resolved.
- cd /app/web && composer install && composer run-script drupal-phpunit-upgrade
overrides:
environment:
SIMPLETEST_BASE_URL: "https://drupal-contributions.lndo.site/"
SIMPLETEST_DB: "sqlite://localhost/tmp/db.sqlite"
MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--headless", "--no-sandbox"]}}, "http://chrome:9515"]'
chrome:
type: compose
app_mount: false
services:
image: drupalci/webdriver-chromedriver:production
command: chromedriver --log-path=/tmp/chromedriver.log --verbose --whitelisted-ips=
tooling:
drush:
service: appserver
cmd:
drush --root=/app/web --uri=https://drupal-contributions.lndo.site
si:
service: appserver
description: Install Drupal
cmd:
- appserver: /app/scripts/site-install.sh
patch:
service: appserver
description: Get a patch from a Drupal project issue queue
cmd:
- appserver: php /app/scripts/patch-helpers.php
options:
url:
describe: The url of the patch from the issue queue
revert:
service: appserver
description: Apply a patch from a Drupal project issue queue
cmd:
- appserver: php /app/scripts/patch-helpers.php --revert
patch:
describe: The name of the patch to revert; i.e. DESCRIPTION-XXXXXXX-YY.patch
create-patch:
service: appserver
description: Creat a patch from your committed changes on your branch.
cmd:
- appserver: php /app/scripts/patch-helpers.php --create-patch
phpunit:
service: appserver
user: www-data
cmd:
- appserver: /app/web/vendor/bin/phpunit -c /app/config
test:
service: appserver
cmd:
- php /app/web/core/scripts/run-tests.sh --php /usr/local/bin/php --url https://drupal-contributions.lndo.site --color --verbose
events:
post-destroy:
- rm -rfv web
pre-rebuild:
- rm -rfv web
- appserver: php /app/scripts/get-drupal.php
post-rebuild:
- appserver: /app/scripts/rebuild.shFences: https://www.drupal.org/project/fences
Two issues called out under “Corrected deprecation errors” in release notes:
Both were Novice issues that I created.
This slide deck by
Benji
Fisher is licensed under a
Creative
Commons Attribution-ShareAlike 4.0 International License.
Based on a work at
https://gitlab.com/benjifisher/slide-decks.