-
Notifications
You must be signed in to change notification settings - Fork 0
/
.lando.dist.yml
79 lines (77 loc) · 3.21 KB
/
.lando.dist.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
recipe: drupal10
config:
webroot: web
via: apache:2.4
php: '8.3'
database: mariadb:10.6
# Off by default, enabled with lando xdebug-on.
xdebug: false
config:
#database: config/my-custom.cnf
# Can be seen at /usr/local/etc/php/conf.d/zzz-lando-my-custom.ini.
php: lando-config/php.ini
#server: config/server.conf
#vhosts: config/default.conf
services:
appserver:
build:
- "env COMPOSER_DEV=1 ./orch/build.sh"
overrides:
environment:
# Let Drupal know that this is a local environment.
DRUPAL_ENV_LOCAL: 1
# Allows path mapping in PhpStorm and CLI debugging.
# https://docs.lando.dev/guides/lando-phpstorm.html#debugging-cli-commands.
PHP_IDE_CONFIG: "serverName=appserver"
# Set debug mode here, instead of in config: xdebug so it can be toggled off and on.
# Develop allows additional features, like html in var_dump.
# https://xdebug.org/docs/develop.
# Debug allows step debugging.
# https://xdebug.org/docs/remote.
XDEBUG_MODE: 'debug,develop'
# DO NOT USE XDEBUG_CONFIG, instead set these in lando-config/php.ini.
# If you set them here, they unset the magic lando does for xdebug.client_host.
# You can see these by: lando drush eval 'print_r(getenv());' | grep XDEBUG_CONFIG
#XDEBUG_CONFIG: 'log_level=0'
tooling:
# @todo: Convert this to a robo command and make configurable.
export-content:
service: appserver
cmd:
- 'rm -r web/modules/custom/bixal_default_content/content'
- 'drush default-content:export-references node --folder=modules/custom/bixal_default_content/content'
- 'drush default-content:export-references menu_link_content --folder=modules/custom/bixal_default_content/content'
- 'drush default-content:export-references media --folder=modules/custom/bixal_default_content/content'
patch:
service: appserver
description: Apply composer patches or regenerate lock hash.
cmd:
- "./composer.sh update --lock"
si:
service: appserver
description: Install a fresh Drupal site from configuration.
cmd:
- "env DRUPAL_UPDATE_OR_INSTALL=install ./orch/deploy_install.sh"
- "env DRUPAL_SOLR_SITE_HASH=abcdef ./orch/post_deploy.sh"
- "drush uli"
su:
service: appserver
description: Run updates, import configuration, run cron, etc (Install if not installed).
cmd:
- "env DRUPAL_UPDATE_OR_INSTALL=install ./orch/deploy_update.sh"
- "env DRUPAL_SOLR_SITE_HASH=abcdef ./orch/post_deploy.sh"
- "drush uli"
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:
- "[ -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini ]] && { 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; } || { echo 'Xdebug is already disabled.'; }"
- tput setaf 1 && echo "Xdebug Off" && tput sgr 0 && echo