Skip to content

Instantly share code, notes, and snippets.

@mordonez
Created September 28, 2023 13:46
Show Gist options
  • Save mordonez/89298944696f794ee2a88485422f0773 to your computer and use it in GitHub Desktop.
Save mordonez/89298944696f794ee2a88485422f0773 to your computer and use it in GitHub Desktop.
Drupal + lando + pantheon + ssh agent
name: drupal-project
recipe: pantheon
config:
framework: drupal8
site: XXXX
id: XXXX
services:
appserver:
run_as_root:
- chown www-data:www-data /run/host-services/ssh-auth.sock
- chmod g+w /run/host-services/ssh-auth.sock
overrides:
# Pass SSH keys.
volumes:
- type: bind
# https://github.com/lando/lando/issues/478#issuecomment-654634511
# Linux user: add 'export LANDO_SSH_AUTH_SOCK="${SSH_AUTH_SOCK}"' at the end of your ~/.bashrc:
# Mac user: MacOS specific path is here as the variable default value, nothing to do.
source: "${LANDO_SSH_AUTH_SOCK:-/run/host-services/ssh-auth.sock}"
target: /run/host-services/ssh-auth.sock
environment:
SSH_AUTH_SOCK: /run/host-services/ssh-auth.sock
SIMPLETEST_BASE_URL: "http://http://drupalproject-offering.lndo.site"
SIMPLETEST_DB: "mysql://pantheon:pantheon@database/pantheon"
MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--headless"]}}, "http://chrome:9515"]'
chrome:
type: compose
services:
image: drupalci/webdriver-chromedriver:production
command: chromedriver --log-path=/tmp/chromedriver.log --verbose --whitelisted-ips=
tooling:
phpunit:
service: appserver
cmd: /app/vendor/bin/phpunit -c /app/phpunit.local.xml
ssh-fix:
service: appserver
description: Fix ssh auth sock permission for MacOS users. Lando rebuild fixes the problem as well.
cmd: "/bin/chgrp www-data /run/host-services/ssh-auth.sock && /bin/chmod g+w /run/host-services/ssh-auth.sock"
user: root
events:
post-start:
- appserver: test -e ~/.ssh/config || printf 'Host *\n AddKeysToAgent yes\n' > ~/.ssh/config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment