-
Notifications
You must be signed in to change notification settings - Fork 1
/
.lando.yml
194 lines (170 loc) · 4.96 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
name: [PROYECTO]
recipe: drupal10
config:
webroot: web
php: '8.1'
composer_version: 2-latest
drush: ^11
xdebug: debug
config:
php: ./.lando/php/php.ini
services:
# Configuración del contenedor principal.
appserver:
build:
- ./.lando/scripts/prepare_lando.sh
build_as_root:
- find ./.lando/scripts/ -type f -iname "*.sh" -exec chmod +x {} \;
- ./.lando/scripts/prepare_lando_root.sh
run:
- find ./scripts/shell/ -type f -iname "*.sh" -exec chmod +x {} \;
- ./scripts/shell/install.sh
scanner:
maxRedirects: 0
timeout: 3000
retry: 10
overrides:
environment:
# Soporte para debug con Drush y XDEBUG.
PHP_IDE_CONFIG: "serverName=appserver"
# PHPUnit.
SIMPLETEST_BASE_URL: "https://[PROYECTO].lndo.site"
SIMPLETEST_DB: "mysql://[DB_USER]:[DB_PASSWORD]@database/[DB_DATABASE]"
# Mailhog.
PHP_SENDMAIL_PATH: '/usr/sbin/sendmail -S mailhog:1025'
# Drush.
DRUSH_OPTIONS_URI: "https://[PROYECTO].lndo.site"
# Configuración de la base de datos.
# database: disabled # No activa el servicio de database.
# Uso mariadb por defecto porque en algunas distribuciones de Linux mysql falla.
database:
type: mariadb
portforward: 3307
creds:
user: [DB_USER]
database: [DB_DATABASE]
password: [DB_PASSWORD]
# Esta configuración se puede usar para generar nuevas bases de datos,
# nuevos usuarios..., es ideal para multi-site y evitar tener que crear
# varios contenedores con bases de datos.
# run:
# - mysql -uroot < /app/.lando/db-setup.sql
# Captura de correos.
mailhog:
type: mailhog
portforward: true
hogfrom:
- appserver
# Gestión de la base de datos.
adminer:
type: compose
services:
image: dehy/adminer
command: '/bin/s6-svscan /etc/services.d'
portforward: true
depends_on:
- database
# Gestión de caché.
cache:
type: redis
portforward: 6380
persist: true
proxy:
appserver:
- [PROYECTO].lndo.site
- cdn.[PROYECTO].lndo.site
mailhog:
- mail.[PROYECTO].lndo.site
adminer:
- db.[PROYECTO].lndo.site
tooling:
# ############################################################################
# Zona de herramientas.
# ############################################################################
# lando gulp
gulp:
service: appserver
description: Ejecución del watch de gulp en el custom theme.
dir: /app/web/themes/custom/[THEME_MACHINE_NAME]/
cmd:
- gulp
# lando npm
npm:
service: appserver
description: Ejecución del gestor de paquetes npm dentro del custom theme.
dir: /app/web/themes/custom/[THEME_MACHINE_NAME]/
cmd:
- npm
# lando sass
sass:
service: appserver
description: Ejecución del watch de sass en el custom theme.
dir: /app/web/themes/custom/[THEME_MACHINE_NAME]/
cmd:
- sass -w ./scss:./css --style compressed
# lanto test
test:
service: appserver
description: Ejecución PHPUnit pasando la suite que queremos ejecutar.
cmd: "php /app/vendor/bin/phpunit -c /app/phpunit.xml --testsuite"
# lando redis-cli
redis-cli:
service: cache
description: Ejecución del cli de Redis.
# ############################################################################
# Zona de Scripts personalizados.
# ############################################################################
# lando druli
druli:
service: appserver
description: Ejecuta 'drush uli' con la URI del proyecto.
cmd:
- appserver: drush uli --uri=https://[PROYECTO].lndo.site
# lando db [ex|im]
db:
service: appserver
description: Importar o exportar base de datos.
cmd:
- ./scripts/shell/db.sh
# lando deploy
deploy:
service: appserver
description: Ejecutar deploy en entorno de desarrollo.
cmd:
- ./scripts/shell/deploy.sh
user: root
# lando dev [on|off]
dev:
service: appserver
description: Cambiar el tipo de entorno modificando los módulos y configuraciones.
cmd:
- ./scripts/shell/dev_mode.sh
# lando initialize
initialize:
service: appserver
description: Borra la instalación actual y restablece el proyecto a su estado inicial.
cmd:
- ./scripts/shell/initialize.sh
user: root
# lando phpcs
phpcs:
service: appserver
description: Ejecutar tareas de Code Sniffer.
cmd:
- ./scripts/shell/phpcs.sh
# lando trans [ex|im]
trans:
service: appserver
description: Importar o exportar traducciones.
cmd:
- ./scripts/shell/trans.sh
# ############################################################################
# Zona de modificación de Lando.
# ############################################################################
# lando xdebug [on|off]
xdebug:
service: appserver
description: Activar/Desactivar xdebug.
cmd:
- ./.lando/scripts/xdebug.sh
user: root