-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.lando.yml
74 lines (73 loc) · 2.61 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
name: codingblackfemales
recipe: wordpress
config:
database: mariadb
php: '8.2'
via: apache
webroot: web
xdebug: false
config:
php: .lando/config/php/php.ini
# Multisite networks must have each site listed below to work under lando
# and the URLs must match those in the wp_blogs table
proxy:
appserver:
- wp.codingblackfemales.lndo.site
- academy.codingblackfemales.lndo.site
- jobs.codingblackfemales.lndo.site
- cms.codingblackfemales.lndo.site
services:
appserver:
composer_version: 2-latest
build_as_root:
# Installation instructions adapted from: https://github.com/nodesource/distributions/blob/69a45587cd87bd8c700e40bb8a8160e0c28d71d8/README.md#installation-instructions
# Download and install the Nodesource GPG key
- apt-get update
- apt-get install -y ca-certificates curl gnupg
- mkdir -p /etc/apt/keyrings
- curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
# Create deb repository
# NODE_MAJOR=20 # Doesn't work here, set in environment overrides below
- echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
# Run update and install
- apt-get update
- apt-get install -y nodejs
- a2enmod headers
run:
- composer install
- npm install
run_as_root:
- .lando/scripts/xdebug.sh develop,debug
overrides:
environment:
XDEBUG_MODE:
PHP_IDE_CONFIG: "serverName=appserver"
NODE_MAJOR: 20
database:
portforward: 3307
# https://github.com/lando/lando/issues/1668#issuecomment-557090549
# events:
# pre-wp:
# - appserver: rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && pkill -o -USR2 php-fpm
# post-wp:
# - appserver: docker-php-ext-enable xdebug && pkill -o -USR2 php-fpm
tooling:
node:
service: appserver
npm:
service: appserver
# https://github.com/lando/lando/issues/1668#issuecomment-772829423
xdebug-on:
service: appserver
description: Enable Xdebug.
user: root
cmd:
- docker-php-ext-enable xdebug && kill -USR2 $(pgrep -o php-fpm) > /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) > /dev/null || /etc/init.d/apache2 reload
- tput setaf 1 && echo "Xdebug Off" && tput sgr 0 && echo