forked from finnef/lando-drupal8-test-debugging
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.lando.yml
94 lines (93 loc) · 3.15 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
## Lando Drupal 8 Test Debugging: ##
# https://github.com/JPustkuchen/lando-drupal8-test-debugging
# You can put local overrides in .lando.local.yml
name: drupal8phpunit
# https://docs.devwithlando.io/tutorials/drupal8.html
recipe: drupal8
# Add some default configuration for the recipe here. Which will be passed to all the services within the recipe.
# https://docs.devwithlando.io/recipes/drupal8.html
config:
# Set the webserver
via: apache
# Set the php version.
php: 7.4
# Set the composer version
composer_version: '2.0.8'
# Set the webroot dir.
webroot: web
# Enable xdebug using "lando xdebug-on" tooling defined below.
xdebug: true
# Database
database: mariadb
# Drush
drush: ^10
# We can add additional services here or even override some configuration.
services:
appserver:
run:
# Run global init.sh first with installation profile, afterwards custom
# initializations.
- .lando-config/lando-init.sh minimal && bash .lando-config/lando-init.custom.sh
xdebug: true
config:
# See https://docs.lando.dev/guides/lando-with-vscode.html#getting-started
php: .lando-config/appserver.php.ini
overrides:
environment:
# Enable PHPStorm XDebug with CLI.
PHP_IDE_CONFIG: "serverName=appserver"
# Set the Mink webdriver args.
MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", null, "http://host.docker.internal:4444/wd/hub"]'
volumes:
# Fix linux docker host.docker.internal resolving.
- '.lando-config/lando-linux-hosts.sh:/scripts/linux-hosts.sh'
database:
# Allow external access by a random mysql port.
# From within other containers you can always access the database via
# database.drupal8phpunit.lndo.site:3306
# or
# database.drupal8phpunit.internal:3306
portforward: true
creds:
user: drupal
password: drupal
database: database
mailhog:
# Mailhog can be accessed at "mailhog.drupal8phpunit.lndo.site"
# (see proxy below)
type: mailhog
portforward: true
hogfrom:
- appserver
phpmyadmin:
# PhpMyAdmin can be accessed at "phpmyadmin.drupal8phpunit.lndo.site"
# (see proxy below)
type: phpmyadmin
hosts:
- database
proxy:
mailhog:
- mailhog.drupal8phpunit.lndo.site
phpmyadmin:
- phpmyadmin.drupal8phpunit.lndo.site
# This will add some tools from the containers to the command line of your OS.
# https://docs.devwithlando.io/config/tooling.html
tooling:
phpunit:
service: appserver
description: "Run PHP Unit tests: lando phpunit"
cmd: "/app/vendor/bin/phpunit --debug --configuration /app/web/core/phpunit.xml --printer=\\Drupal\\Tests\\Listeners\\HtmlOutputPrinter"
drush:
cmd: "/app/vendor/bin/drush --root=/app/web --uri=http://drupal8phpunit.lndo.site --ansi"
drupal:
cmd: "/app/vendor/bin/drupal --root=/app/web"
xdebug-on:
service: appserver
description: Enable xdebug.
cmd: "docker-php-ext-enable xdebug && /etc/init.d/apache2 reload"
user: root
xdebug-off:
service: appserver
description: Disable xdebug.
cmd: "rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && /etc/init.d/apache2 reload"
user: root