-
Notifications
You must be signed in to change notification settings - Fork 1
/
.lando.yml
155 lines (155 loc) · 5.34 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
# https://docs.lando.dev/
# UPDATE: name property should be unique name for project.
name: vote-gov
recipe: drupal10
# Define services, remove any services your project doesn't need.
# https://docs.lando.dev/config/services.html#supported-services
config:
php: '8.3'
composer_version: '2.7.7'
database: mysql:8.0
# Adjust this to point to directory where index.php exist.
webroot: web
# Make false if you need better performance and don't need to use XDebug.
xdebug: false
# https://docs.lando.dev/config/events.html#usage
# Can setup proxy urls to your services.
# https://docs.lando.dev/config/proxy.html
services:
node:
type: "node:18"
scanner: false
ssl: true
sslExpose: false
build_as_root:
- apt update -y && apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb -y
build:
- npm install --prefix /app/testing && npm install -g cypress@12.9.0
overrides:
ports:
- "32654:32654"
appserver:
# Point to custom development php.ini
config:
php: '.lando/config/php.ini'
overrides:
environment:
DRUSH_OPTIONS_ROOT: '/app/web'
# UPDATE: to the same as the name key above.
DRUSH_OPTIONS_URI: 'http://vote-gov.lndo.site'
# Adding this variable for PHPStorm
PHP_IDE_CONFIG: "serverName=appserver"
cypress_random_pass: "password"
tome:
type: apache
webroot: html
# pma:
# type: phpmyadmin
# hosts:
# - database
proxy:
# custom proxy for static site files generated by tome.
tome:
- html.vote-gov.lndo.site
# pma:
# # UPDATE: to the same as the name key above.
# - pma.vote-gov.lndo.site
# Setup tooling so when you type lando keyword
# it knows the service to use.
# https://docs.lando.dev/config/tooling.html#usage
tooling:
phplint:
cmd: '/app/vendor/squizlabs/php_codesniffer/bin/phpcs --ignore=*/node_modules/* --standard=/app/vendor/drupal/coder/coder_sniffer/Drupal,vendor/drupal/coder/coder_sniffer/DrupalPractice --extensions=php,module,inc,theme,info,yml,twig --report=full /app/web/modules/custom /app/web/themes/custom -n'
service: appserver
npm-testing:
service: node
description: Used for npm <commands>
cmd: npm --prefix /app/testing
npm-theme:
service: node
description: Runs npm commands
cmd: npm --prefix /app/web/themes/custom/votegov
gulp:
service: node
dir: "/app/web/themes/custom/votegov"
cmd: npm run gulp --prefix /app/web/themes/custom/votegov
gulp-compile:
service: node
dir: "/app/web/themes/custom/votegov"
cmd: npm run build --prefix /app/web/themes/custom/votegov
# Custom lando command, to sync Drupal db with updates, config changes in codebase.
'cy:axe':
service: node
cmd: npm run cy:axe --prefix /app/testing
description: run cypress accessibility test - headless
'cy:links':
service: node
cmd: npm run cy:links --prefix /app/testing
description: run cypress internal links tess - headless
'cy:proofer':
service: node
cmd: npm run cy:proofer --prefix /app/testing
description: run cypress external links test - headless
# removing the follow script until further work can be done for cypress and cli commands to work together
# 'cy:createUser':
# service: node
# cmd: npm run cy:createUser --prefix /app/testing
# description: run cypress create user script - headless
# 'cy:deleteUser':
# service: node
# cmd: npm run cy:deleteUser --prefix /app/testing
# description: run cypress delete user script - headless
# 'cy:test':
# service: node
# cmd: npm run cy:test --prefix /app/testing
# description: run cypress functional tests - headless
# 'cy:testSuite':
# service: node
# cmd: npm run cypress run --prefix /app/testing
# description: run full testing suite, functional, internal links, external links and accessibility - headless
retune:
service: appserver
description: Branch update (run composer / db updates / import config / clear caches).
cmd:
- composer install
- drush cr
- drush updb
- drush cim -y
- drush locale-check
- drush locale-update
- drush cr
import-translations:
service: appserver
description: Import string translations from vote_utility module
cmd:
- drush locale-check
- drush locale-update
- drush cr
set:
service: appserver
description: Creates a settings.local file
cmd:
- cp /app/.lando/settings.local.php /app/web/sites
- cp /app/.lando/services.local.yml /app/web/sites
- drush cr
static:
service: appserver
description: Manually recompiles static site and assets
cmd:
- drush tome:static --uri=http://html.vote-gov.lndo.site
xoff:
cmd: "rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && /etc/init.d/apache2 reload"
description: Disable xdebug.
service: appserver
user: root
xon:
cmd: "docker-php-ext-enable xdebug && /etc/init.d/apache2 reload"
description: Enable xdebug.
service: appserver
user: root
events:
post-set:
- echo "Successfully enabled local development settings and services files!"
pre-db-import:
# Fix MySQL 8 import issue (dropping DB with Drush). https://github.com/lando/lando/issues/2679
- appserver: echo "Dropping the DB with Drush" && drush sql:drop -y