-
Notifications
You must be signed in to change notification settings - Fork 4
/
.lando.yml
69 lines (69 loc) · 2.39 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
name: fix-image-rotation
recipe: wordpress
config:
via: nginx
php: 7.4
webroot: wordpress
database: mariadb
xdebug: true
config:
php: .lando/php.ini
services:
mailhog:
type: mailhog
portforward: false
hogfrom:
- appserver
appserver:
overrides:
environment:
# Make this environment variable empty or else runtime xdebug mode change will not work
XDEBUG_MODE: ''
# Support debugging Drush with XDEBUG.
PHP_IDE_CONFIG: "serverName=appserver"
PROFILER_OUTPUT_DIR: "profiler-output" # If changing this value, change in .gitignore also
volumes:
- '.lando/wp-cli.yml:/wp-cli.yml'
- '.:/app/wordpress/wp-content/plugins/fix-image-rotation'
- '/app/wordpress/wp-content/plugins/fix-image-rotation/wordpress'
- '/app/wordpress/wp-content/plugins/fix-image-rotation/node_modules'
build_as_root:
- curl -sL https://deb.nodesource.com/setup_14.x | bash -
- apt-get install -y nodejs
build:
- wp core download --force --skip-content
- touch slow.log && chmod 777 slow.log
run:
- sleep 2 # For some reason, we have to wait at least a second till database is up.
- | # Create WordPress config file and add necessary constants and custom config
wp config create --dbhost=database --dbname=wordpress --dbuser=wordpress --dbpass=wordpress --dbprefix=wp_ --force
- wp config set WP_DISABLE_FATAL_ERROR_HANDLER true --raw
- wp config set WP_DEBUG true --raw
- wp config set WP_DEBUG_LOG true --raw
- wp config set WP_DEBUG_DISPLAY false --raw
- wp config set WP_ENVIRONMENT_TYPE 'local'
- wp db reset --yes
- rm -rf /app/wordpress/wp-content/uploads/*
- | # Let's check if WordPress is not installed, then install it
wp core install --url=https://$LANDO_APP_NAME.$LANDO_DOMAIN \
--title=$LANDO_APP_NAME \
--admin_user=admin \
--admin_password=password \
--admin_email=lando@wordpress.org \
--skip-email
wp theme install --activate twentytwentytwo
tooling:
xdebug:
description: Loads Xdebug in the selected mode.
cmd:
- appserver: /app/.lando/xdebug.sh
user: root
node:
service: appserver
npm:
service: appserver
imagick:
description: Enable or disable Imagick extension.
cmd:
- appserver: /app/.lando/imagick.sh
user: root