-
Notifications
You must be signed in to change notification settings - Fork 8
/
.lando.yml
61 lines (61 loc) · 2.33 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
name: bea-content-sync-fusion
recipe: wordpress
config:
webroot: ./wordpress/
env:
- .env.testing
services:
appserver:
run_as_root:
- ln -s /app/ /app/wordpress/wp-content/plugins/bea-content-sync-fusion
test:
type: mysql:5.7
portforward: true
creds:
user: test
password: test
database: test
events:
# Runs composer install and a custom php script before your app starts
pre-start:
- appserver: cd $LANDO_MOUNT && composer install
tooling:
setup:
service: appserver
description: 'Setup env'
cmd:
- echo "➡️ Reset DB ?"
- if [ -f /app/wordpress/wp-config.php ]; then echo "wp-config exists reset DB" && wp db reset --yes --path=/app/wordpress ; else echo "No wp-config.php, no reset" ; fi
- echo "➡️ Reset config"
- if [ -f /app/wordpress/wp-config.php ]; then echo "wp-config exists deleting it" && rm -f /app/wordpress/wp-config.php; else echo "No wp-config.php, no rm" ; fi
- echo "➡️ Create config"
- wp config create --dbname=wordpress --dbuser=wordpress --dbpass=wordpress --dbhost=database --path=/app/wordpress
- echo "➡️ Install WP"
- wp core multisite-install --url=https://bea-content-sync-fusion.lndo.site --title="Content sync fusion" --admin_password=admin --admin_email=admin@admin.fr --path=wordpress --skip-email
- echo "➡️ Install query monitor"
- wp plugin install --activate-network query-monitor
- echo "➡️ Activate plugin"
- wp plugin activate --network bea-content-sync-fusion
- echo "➡️ Add new sites"
- wp site create --slug=site-1 --title="Site 1"
- wp site create --slug=site-2 --title="Site 2"
- wp site create --slug=site-3 --title="Site 3"
- wp site create --slug=site-4 --title="Site 4"
- echo "➡️ Copye .htaccess"
- cp /app/tests/bin/htaccess /app/wordpress/.htaccess
test-unit:
service: appserver
cmd: composer test-unit
description: Run our PHPunit tests
test-wpunit:
service: appserver
cmd: composer test-wpunit
description: Run our wpunit tests
test-acceptance:
service: appserver
cmd: composer test-acceptance
description: Run our acceptance tests
test-functional:
service: appserver
cmd: composer test-functional
description: Run our functional tests