-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.lando.yml
131 lines (131 loc) · 4.65 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: drupal-11-dev
recipe: drupal11
config:
site: drupal-11-dev
webroot: web
php: '8.3'
# Set xdebug to off by default. Enable it with lando xdebug.
xdebug: false
database: mysql:8.0
config:
php: lando/configs/php/php.ini
services:
appserver:
build_as_root:
# Create error logs.
- mkdir -p /app/lando/logs
- rm -f /app/lando/logs/php_errors.log
- touch /app/lando/logs/php_errors.log
- rm -f /app/lando/logs/xdebug.log
- touch /app/lando/logs/xdebug.log
# Create custom Drush config to override PHP memory_limit from php.ini.
- mkdir -p ~/.drush
- cp /app/lando/configs/drush/drush.ini ~/.drush/drush.ini
- mkdir -p /etc/drush
- cp /app/lando/configs/drush/drush.ini /etc/drush/drush.ini
# Install Nano for debugging purposes (You can use nano after running lando ssh to enter container).
- mkdir -p /var/lib/apt/lists/partial
- apt-get update && apt install nano
# Start developer off with reasonable local Drupal settings.
- cp /app/lando/configs/drupal/settings.local.php /app/web/sites/default/settings.local.php
- cp /app/lando/configs/drupal/development.services.yml /app/web/sites/development.services.yml
overrides:
environment:
# PHPUnit configuration. Sometimes the configuration in phpunit.xml is ignored.
SIMPLETEST_BASE_URL: "http://drupal-11-dev.lndo.site"
SIMPLETEST_DB: "mysql://drupal:drupal@database/drupal"
BEHAT_PARAMS: '{"extensions" : {"Behat\\MinkExtension" : {"base_url" : "https://drupal-11-dev.lndo.site/"}, "Drupal\\DrupalExtension" : {"drush" : { "root": "/app/web" }}}}'
# Support debugging Drush with Xdebug.
PHP_IDE_CONFIG: "serverName=appserver"
DRUSH_OPTIONS_URI: "https://drupal-11-dev.lndo.site/"
# This is apparently necessary to overwrite the default Xdebug 3.0
# config so that our config in /lando/configs/php/php.ini is used.
XDEBUG_MODE:
database:
portforward: 32816
creds:
user: drupal
password: drupal
database: drupal
# Selenium Chrome for Behat tests.
# Feel free to delete if not using Behat.
selenium-chrome:
type: compose
app_mount: false
services:
image: seleniarm/standalone-chromium:101.0-20220429
environment:
TZ: America/Los_Angeles
START_XVBF: "false"
volumes:
- /dev/shm:/dev/shm
- ./tests/behat/media:/media:cached
command: /opt/bin/entry_point.sh
tooling:
# Override Drush to run with no memory limit and use version installed by Composer instead of packaged with Lando.
drush:
service: appserver
description: Run Drush commands
cmd: php -d memory_limit=-1 /app/vendor/bin/drush
drupal-reinstall:
service: appserver
description: DROPs the current database, runs composer install, drush site:install, database updates, config import, deploy hooks and clears caches
cmd:
- /app/lando/scripts/drupal-reinstall.sh
drupal-reset:
service: appserver
description: KEEPs the current database, runs composer install, database updates, config import, deploy hooks and clears caches
cmd:
- /app/lando/scripts/drupal-reset.sh
xdebug:
description: Starts or stops Xdebug
cmd:
- appserver: /app/lando/scripts/xdebug.sh
user: root
logs-php:
service: appserver
description: Displays and tails PHP error logs
cmd: tail -f /app/lando/logs/php_errors.log
logs-xdebug:
service: appserver
description: Displays and tails Xdebug logs
cmd: tail -f /app/lando/logs/xdebug.log
logs-drupal:
service: appserver
description: Displays and tails Drupal logs using Drush
cmd:
- drush wt --extended
php-cs:
service: appserver
description: Runs PHP_CodeSniffer on custom modules and themes
cmd:
- /app/lando/scripts/php-cs.sh
twig-cs:
service: appserver
description: Runs Twig-CS-Fixer on custom themes and modules
cmd:
- /app/lando/scripts/twig-cs.sh
phpunit:
service: appserver
cmd:
- /app/lando/scripts/phpunit.sh
behat:
service: appserver
description: Runs Behat tests
cmd:
- /app/lando/scripts/behat.sh
behat-search-steps:
service: appserver
description: Searches (greps) Behat step definitions for string
cmd:
- /app/lando/scripts/behat-search-steps.sh
drupal-create-users:
service: appserver
description: Creates Drupal user accounts for testing/development purposes
cmd:
- /app/lando/scripts/drupal-create-users.sh
drupal-status:
service: appserver
description: Runs drush status and drush config-status
cmd:
- /app/lando/scripts/drupal-status.sh