-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
.lando.yml
101 lines (98 loc) · 3.36 KB
/
.lando.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: drupalcz
recipe: drupal9
excludes:
- vendor
config:
webroot: docroot
xdebug: false
services:
appserver:
type: php:7.4
composer_version: 2
overrides:
# Pass SSH keys.
volumes:
- ${HOME}/.lando/composer_cache:/var/www/.composer
- type: bind
# 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
# Load custom php.ini files if exist in .lando/config/php directory.
PHP_INI_SCAN_DIR: "/usr/local/etc/php/conf.d:/app/.lando/config/php"
# Support debugging Drush with xdebug.
PHP_IDE_CONFIG: "serverName=appserver"
DRUSH_ALLOW_XDEBUG: 1
XDEBUG_MODE: debug
composer:
squizlabs/php_codesniffer: '*'
drupal/coder: '*'
phpcompatibility/php-compatibility: '*'
run:
- /var/www/.composer/vendor/bin/phpcs --config-set installed_paths /var/www/.composer/vendor/phpcompatibility/php-compatibility
- /var/www/.composer/vendor/bin/phpcs --config-set error_severity 1
- /var/www/.composer/vendor/bin/phpcs --config-set warning_severity 8
run_as_root:
- chown www-data:www-data /run/host-services/ssh-auth.sock
- chmod g+w /run/host-services/ssh-auth.sock
# - /app/.lando/setup_terminus.sh
extras:
- apt -qq update && apt -qq -y install pv jq
node:
type: node:8
globals:
gulp-cli: "latest"
gulp: "latest"
build:
- "cd $LANDO_MOUNT/docroot/themes/custom/dcz_theme && npm install"
# Needed for gulp-notify in themes to prevent errors
# when running watch task.
extras:
- apt -qq update && apt -qq -y install libnotify-bin
# Chatch all mail trying to get out of appserver.
mailhog:
type: mailhog
hogfrom:
- appserver
portforward: true
events:
post-start:
- appserver: scripts/create-settings.sh
- appserver: test -e ~/.ssh/config || printf 'Host *\n AddKeysToAgent yes\n' > ~/.ssh/config
tooling:
fresh-install:
service: appserver
description: Setup all local sites (including settings.php) from fresh DB copy. Use `lando fresh-install from-local` to use DBs from last import.
cmd:
- "/app/.lando/fresh-install.sh"
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
xdebug-on:
service: appserver
description: Enable xdebug for apache.
cmd: "docker-php-ext-enable xdebug && /etc/init.d/apache2 reload"
user: root
xdebug-off:
service: appserver
description: Disable xdebug for apache.
cmd: "rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && /etc/init.d/apache2 reload"
user: root
npm:
service: node
description: Pass npm commands.
phpcs:
service: appserver
description: Pass phpcs commands.
proxy:
# Mailhog web UI.
mailhog:
- drupalcz-mailhog.lndo.site
appserver:
- drupalcz.lndo.site
node:
- bs.drupalcz.lndo.site:3000