-
Notifications
You must be signed in to change notification settings - Fork 22
/
.lando.yml
91 lines (91 loc) · 3.06 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
name: bee
recipe: backdrop
keys: false
config:
php: 8.3
webroot: backdrop
database: mysql
# Set Xdebug off by default. We use the tooling below to turn it on as needed.
xdebug: false
# Need to disable bee so can use the version in the repo.
bee: false
services:
appserver:
config:
php: .lando/php.ini
build_as_root:
# As bee is now added by default, we need to remove any existing versions
# of bee if you tested a versioned install of bee by adding in the config
# section above.
# Remove the parent folder if it exists.
- rm -rf /var/www/.bee
# Remove the symlink if it exists.
- rm -f /usr/local/bin/bee
build:
# Make symlink for `bee` pointing to this version.
- ln -s /app/bee.php /usr/local/bin/bee
# Download Backdrop.
- wget -q --show-progress -O /app/backdrop.zip https://github.com/backdrop/backdrop/archive/1.x.zip
# Download PHPUnit.
- wget -q --show-progress -O /app/phpunit https://phar.phpunit.de/phpunit-8.5.phar
- chmod +x /app/phpunit
# Download Box
- wget -q --show-progress -O /app/box "https://github.com/box-project/box/releases/download/4.4.0/box.phar"
- chmod +x /app/box
run:
# Run setup tasks.
- /app/.lando/setup.sh setup
overrides:
environment:
XDEBUG-CONFIG: "start_with_request=yes"
XDEBUG_MODE: 'debug,develop'
database:
healthcheck: mysql --defaults-extra-file=/app/.lando/mysql.cnf --silent --execute "SHOW DATABASES;"
multisite:
type: php:8.3
webroot: multisite
events:
pre-rebuild:
# Run clean-up tasks.
- /app/.lando/setup.sh clean
# Remove `bee` symlink, Backdrop, PHPUnit, Box and any created bee.phar files.
- rm -f /usr/local/bin/bee /app/backdrop.zip /app/phpunit /app/box /app/bee.phar
pre-destroy:
# Run clean-up tasks.
- /app/.lando/setup.sh clean
# Remove `bee` symlink, Backdrop, PHPUnit, Box and any created bee.phar files.
- rm -f /usr/local/bin/bee /app/backdrop.zip /app/phpunit /app/box /app/bee.phar
tooling:
bee:
service: appserver
cmd: bee
box:
service: appserver
cmd: /app/box
reset:
service: appserver
cmd: /app/.lando/setup.sh
run-tests:
service: appserver
cmd:
- cd /app/backdrop && /app/phpunit --testsuite backdrop --configuration /app/tests
- cd /app/multisite && /app/phpunit --testsuite multisite --configuration /app/tests
xdebug-on:
service: appserver
description: Enable Xdebug.
user: root
cmd:
- docker-php-ext-enable xdebug && kill -USR2 $(pgrep -o php-fpm) 2>/dev/null || /etc/init.d/apache2 reload
- tput setaf 2 && echo "Xdebug On" && tput sgr 0 && echo
xdebug-off:
service: appserver
description: Disable Xdebug.
user: root
cmd:
- rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && kill -USR2 $(pgrep -o php-fpm) 2>/dev/null || /etc/init.d/apache2 reload
- tput setaf 1 && echo "Xdebug Off" && tput sgr 0 && echo
proxy:
multisite:
- multi-1.lndo.site
- multi-2.lndo.site
- install-test.lndo.site