forked from dof-dss/unity_base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.lando.base.yml
180 lines (180 loc) · 5.31 KB
/
.lando.base.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
name: unity_base
recipe: drupal9
config:
webroot: web
database: mariadb
php: '8.3'
composer_version: '2.5.8'
config:
php: .lando/config/php.ini
database: .lando/config/my.cnf
compose:
- docker-compose.yml
env_file:
- .env
services:
appserver:
scanner: false
overrides:
environment:
# Set node compilation flag to allow arm64 and x86 chipset compilation.
CPPFLAGS: "-DPNG_ARM_NEON_OPT=0"
# node version set here will be used by the nvm installer script.
NODE_VERSION: 14.21.3
xdebug: debug
build_as_root:
- /app/.lando/scripts/appserver_build.sh
run:
- touch ~/.bashrc
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
database:
build_as_root:
- "sh /app/.lando/scripts/create_databases.sh"
redis:
type: redis:5.0
persist: true
config:
server: .lando/config/redis.conf
mailhog:
type: mailhog
portforward: true
hogfrom:
- appserver
tooling:
drupal:
cmd: "/app/vendor/bin/drupal --root=/app/web"
xdebug-on:
service: appserver
description: Enable xdebug
cmd: "docker-php-ext-enable xdebug && /etc/init.d/apache2 reload"
user: root
xdebug-off:
service: appserver
description: Disable xdebug
cmd: "rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && /etc/init.d/apache2 reload"
user: root
npm:
service: appserver
cmd: /usr/bin/npm
yarn:
service: appserver
cmd: yarn
'nightwatch [site] [test]':
service: appserver
description: "Run Nightwatch.js functional tests.\n\n
Usage:\n
> Run a specific test with tag\n
lando nightwatch <site> --tag your-tag\n
> Run a single test suite file, relative to Drupal core location\n
lando nightwatch <site> ../modules/custom/modulename/tests/src/Nightwatch/Tests/yourTestSuite.js\n
> Run all tests except Core\n
lando nightwatch <site> --skiptags core\n"
cmd: "sh /app/.lando/scripts/run_nightwatch.sh"
options:
site:
passthrough: true
description: Multisite to run tests on
alias:
- s
interactive:
type: input
message: Which Unity site (e.g. uregni) ?
weight: 1
test:
passthrough: true
phpunit:
description: "Run PHPUnit tests. You can pass options, e.g. --group=unity, as you require"
service: appserver
cmd: cd /app/web/core && /app/vendor/bin/phpunit -c /app/web/core/phpunit.xml
phpcs:
description: Run PHPCS checks against all custom Drupal 8 code
service: appserver
cmd: /app/phpcs.sh "/app" "/app/web/sites /app/web/modules/origins /app/web/modules/custom /app/web/themes/custom /app/web/profiles/unity"
drck:
description: Run drupal-check for Drupal 9 compatibility e.g. 'lando drck ./'
service: appserver
cmd: /app/vendor/bin/drupal-check
drush:
server: appserver
cmd: drush -r /app/web
'db-export [file]': disabled
'db-import <file>': disabled
'db-export [name]':
service: database
description: Exports database to a file. To export all databases, don't provide the name'
cmd: "sh /app/.lando/scripts/export_database.sh"
user: root
options:
name:
description: Database to export
alias:
- n
'db-import [database] [file]':
service: database
description: Import file to database
cmd: "sh /app/.lando/scripts/import_database.sh"
user: root
options:
database:
passthrough: true
description: Database to import to
alias:
- d
interactive:
type: input
message: Which database to import to?
weight: 1
file:
passthrough: true
description: File to import
alias:
- f
interactive:
type: input
message: Which file to import?
weight: 2
'db-create [name]':
service: database
description: Create a new database
cmd: "sh /app/.lando/scripts/create_database.sh"
user: root
options:
name:
passthrough: true
description: Name of the database to create
alias:
- n
interactive:
type: input
message: What do you want to call this database?
weight: 1
'db-delete [name]':
service: database
description: Delete a database
cmd: "sh /app/.lando/scripts/delete_database.sh"
user: root
options:
name:
passthrough: true
description: Name of the database to delete
alias:
- n
interactive:
type: input
message: Which database do you want to delete?
weight: 1
db-list:
service: database
description: List all databases
cmd: mysql -uroot -e "SHOW DATABASES;"
user: root
rebuild-unity-site-themes:
service: appserver
description: "Re-builds the Unity themes for each sites. Examples:\n\n
> Rebuild all site themes\n
lando rebuild-unity-site-themes\n
> Rebuild single site theme\n
lando rebuild-unity-site-themes --site-names octf\n
> Rebuild site themes specified - comma separated\n
lando rebuild-unity-site-themes --site-names octf,pbni"
cmd: "/app/build-themes.sh"