Skip to content

Commit 10d20d3

Browse files
committed
Update .lando.yml
1 parent c84e17c commit 10d20d3

1 file changed

Lines changed: 71 additions & 12 deletions

File tree

.lando.yml

Lines changed: 71 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,77 @@
11
name: drupalcz
2-
recipe: drupal8
2+
recipe: drupal9
33

4+
excludes:
5+
- vendor
46
config:
57
webroot: docroot
6-
ssl: true
7-
php: 7.3
88
xdebug: false
9-
overrides:
10-
volumes:
11-
- ${HOME}/.lando/composer_cache:/var/www/.composer
12-
139
services:
14-
database:
15-
portforward: 3310
16-
10+
appserver:
11+
type: php:7.4
12+
composer_version: 1
13+
config:
14+
php: .lando/php.ini
15+
overrides:
16+
# Pass SSH keys.
17+
volumes:
18+
- ${HOME}/.lando/composer_cache:/var/www/.composer
19+
- type: bind
20+
# Linux user: add 'export LANDO_SSH_AUTH_SOCK="${SSH_AUTH_SOCK}"' at the end of your ~/.bashrc:
21+
# Mac user: MacOS specific path is here as the variable default value, nothing to do.
22+
source: "${LANDO_SSH_AUTH_SOCK:-/run/host-services/ssh-auth.sock}"
23+
target: /run/host-services/ssh-auth.sock
24+
environment:
25+
SSH_AUTH_SOCK: /run/host-services/ssh-auth.sock
26+
# Load custom php.ini files if exist in .lando/config/php directory.
27+
PHP_INI_SCAN_DIR: "/usr/local/etc/php/conf.d:/app/.lando/config/php"
28+
# Support debugging Drush with xdebug.
29+
PHP_IDE_CONFIG: "serverName=appserver"
30+
DRUSH_ALLOW_XDEBUG: 1
31+
XDEBUG_MODE: debug
32+
composer:
33+
squizlabs/php_codesniffer: '*'
34+
drupal/coder: '*'
35+
phpcompatibility/php-compatibility: '*'
36+
run:
37+
- /var/www/.composer/vendor/bin/phpcs --config-set installed_paths /var/www/.composer/vendor/phpcompatibility/php-compatibility
38+
- /var/www/.composer/vendor/bin/phpcs --config-set error_severity 1
39+
- /var/www/.composer/vendor/bin/phpcs --config-set warning_severity 8
40+
run_as_root:
41+
- chown www-data:www-data /run/host-services/ssh-auth.sock
42+
- chmod g+w /run/host-services/ssh-auth.sock
43+
# - /app/.lando/setup_terminus.sh
44+
extras:
45+
- apt -qq update && apt -qq -y install pv jq
46+
node:
47+
type: node:14
48+
# Needed for gulp-notify in themes to prevent errors
49+
# when running watch task.
50+
extras:
51+
- apt -qq update && apt -qq -y install libnotify-bin
52+
# Chatch all mail trying to get out of appserver.
1753
mailhog:
1854
type: mailhog
1955
hogfrom:
2056
- appserver
57+
portforward: true
2158

2259
events:
2360
post-start:
2461
- appserver: scripts/create-settings.sh
62+
- appserver: test -e ~/.ssh/config || printf 'Host *\n AddKeysToAgent yes\n' > ~/.ssh/config
2563

2664
tooling:
65+
fresh-install:
66+
service: appserver
67+
description: Setup all local sites (including settings.php) from fresh DB copy. Use `lando fresh-install from-local` to use DBs from last import.
68+
cmd:
69+
- "/app/.lando/fresh-install.sh"
70+
ssh-fix:
71+
service: appserver
72+
description: Fix ssh auth sock permission for MacOS users. Lando rebuild fixes the problem as well.
73+
cmd: "/bin/chgrp www-data /run/host-services/ssh-auth.sock && /bin/chmod g+w /run/host-services/ssh-auth.sock"
74+
user: root
2775
xdebug-on:
2876
service: appserver
2977
description: Enable xdebug for apache.
@@ -34,6 +82,17 @@ tooling:
3482
description: Disable xdebug for apache.
3583
cmd: "rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && /etc/init.d/apache2 reload"
3684
user: root
37-
blt:
85+
npm:
86+
service: node
87+
description: Pass npm commands.
88+
phpcs:
3889
service: appserver
39-
cmd: /app/vendor/bin/blt
90+
description: Pass phpcs commands.
91+
proxy:
92+
# Mailhog web UI.
93+
mailhog:
94+
- drupalcz-mailhog.lndo.site
95+
appserver:
96+
- drupalcz.lndo.site
97+
node:
98+
- bs.drupalcz.lndo.site:3000

0 commit comments

Comments
 (0)