forked from department-of-veterans-affairs/va.gov-cms-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.lando.yml
184 lines (160 loc) · 6.89 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
name: va-gov-cms
recipe: drupal8
config:
webroot: docroot
php: "7.1"
composer_version: '1.10.1'
events:
post-db-import:
# @TODO: Change to `composer yaml-tests va/deploy` once the "filter argument" feature is in place.
- appserver: cd $LANDO_WEBROOT && /app/bin/drush cache-rebuild -y
- appserver: cd $LANDO_WEBROOT && /app/bin/drush updatedb -y
- appserver: cd $LANDO_WEBROOT && /app/bin/drush cache-rebuild -y
- appserver: cd $LANDO_WEBROOT && /app/bin/drush config:import -y
- appserver: cd $LANDO_WEBROOT && /app/bin/drush cache-rebuild -y
# Runs composer install after app starts
post-start:
- appserver: cd $LANDO_MOUNT && composer install
# Pulled from https://github.com/AaronFeledy/lando-examples/tree/master/landofile-changed-alert.
# Alert user if landofile and current environment are out of sync.
- appserver: cd /app && sha1sum --status -c ~/.lando.yml.sha1 || echo $(echo $($TXT_ALERT)Your Lando environment is outdated! Please run \"lando rebuild\" to update.$($TXT_RESET))
# After code changes
post-update:
- appserver: cd $LANDO_MOUNT && composer install
- appserver: cd $LANDO_WEBROOT && drush updb -y && drush cr -y
services:
appserver:
run_as_root:
- "apt-get update -y"
- "apt-get install build-essential chrpath libssl-dev libxft-dev libfreetype6-dev libfreetype6 libfontconfig1-dev libfontconfig1 python -y"
- .lando/scripts/blackfire-init.sh
xdebug: false
config:
php: .lando/zzz-lando-my-custom.ini
build:
# Pulled from https://github.com/AaronFeledy/lando-examples/tree/master/landofile-changed-alert.
# Save a hash of our lando config for future integrity checking.
- sha1sum /app/.lando.yml > ~/.lando.yml.sha1
overrides:
environment:
# You must manually `export` these ENV vars before uncommenting, then run `lando rebuild`
# @see /README.md Build Trigger section
# VA_CMS_BOT_GITHUB_AUTH_TOKEN: ${VA_CMS_BOT_GITHUB_AUTH_TOKEN}
# CMS_JENKINS_VA_CMS_BOT_TOKEN: ${CMS_JENKINS_VA_CMS_BOT_TOKEN}
# ENVIRONMENT_TYPE: ${ENVIRONMENT_TYPE}
# JENKINS_BUILD_ENV: ${JENKINS_BUILD_ENV}
# Support debugging Drush with XDEBUG. Listen in PHPStorm then `lando drush` to trigger xdebug.
PHP_IDE_CONFIG: "serverName=appserver"
# These add colors https://github.com/AaronFeledy/lando-examples/tree/master/colorful-messages
TXT_RESET: tput sgr 0
TXT_RED: tput setaf 1
TXT_GREEN: tput setaf 2
TXT_YELLOW: tput setaf 3
TXT_CYAN: tput setaf 6
TXT_ALERT: tput setab 1 && tput setaf 7
BLACKFIRE_CLIENT_ID: ~
BLACKFIRE_CLIENT_TOKEN: ~
BLACKFIRE_SERVER_ID: ~
BLACKFIRE_SERVER_TOKEN: ~
# Uncomment this to work on site build triggers, then export ENV vars below, then `lando rebuild`.
# Must use lando 3.0.0-rc9+
# @see /README.md Build Trigger section
# va-socks-proxy:
# type: compose
# services:
# image: va/socks-proxy
# build:
# context: ./docker/images/va-socks-proxy
# dockerfile: Dockerfile
# restart: on-failure
# # Only way to run a custom entrypoint in Lando
# # @see https://docs.devwithlando.io/tutorials/compose.html#configuration
# command: /entrypoint.sh
# environment:
# # Must export these first, @see /README.md.
# VA_SOCKS_PROXY_PRIVATE_KEY: ${VA_SOCKS_PROXY_PRIVATE_KEY}
# VA_SOCKS_PROXY_SSH_CONFIG: ${VA_SOCKS_PROXY_SSH_CONFIG}
# Lando Tooling
#
# The list of commands below, under 'tooling' become `lando x` commands.
#
# You do NOT have to restart lando or the environment when you make changes to this file.
# You DO have to reload the command cache by calling `lando` by itself or `lando --clear`.
#
# See https://docs.lando.dev/config/tooling.html#usage
tooling:
migrate-sync:
description: Copy migration ymls from va_gov_migrate to config/sync and run config import. Always edit in va_gov_migrate.
service: appserver
cmd: cp -r /app/docroot/modules/custom/va_gov_migrate/config/install/. /app/config/sync/ && /app/bin/drush config-import -y && /app/bin/drush config-export -y
test:
description: Run all VA.gov tests, as defined in tests.yml. Add arguments to run subsets of tests. For example. "lando test deploy" will run all of the "va/deploy/*" tests.
service: appserver
cmd: composer yaml-tests
# "drush" being here overrides the default "lando drush" command.
# Using /app/bin/drush means we are using the site-local drush directly.
# The reason it does not need "service" is because "drush" already has "service" set!
drush:
cmd: /app/bin/drush
# Build the web front-end
web-build:
service: appserver
cmd: "composer va:web:build"
xdebug-on:
service: appserver
description: Enable xdebug for apache.
cmd: "docker-php-ext-enable xdebug && /etc/init.d/apache2 reload"
user: root
xdebug-off:
service: appserver
description: Disable xdebug for apache.
cmd: "rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && /etc/init.d/apache2 reload"
user: root
phpunit:
service: appserver
description: "Run VA PHPUnit tests found in va/tests/phpunit: lando phpunit. Syntax: lando phpunit"
cmd: "composer yaml-tests va/tests/phpunit"
phpunit-run:
service: appserver
description: "Run specific PHPUnit tests: lando phpunit-run {docroot/MODULE/PATH/TO/TESTS} --filter {testName}"
cmd: "/app/bin/phpunit --debug --exclude-group disabled --verbose --colors=always"
behat:
service: appserver
description: "Run behat tests located in ./tests/behat"
cmd:
- .lando/scripts/behat.sh
test_filter_test:
service: appserver
description: "Run this command to see the strange problem where `lando test behat` does not work."
cmd: "composer yaml-tests va/tests/behat"
test_performance:
service: appserver
cmd: "php scale.php"
# NPM and NODE are now installed via composer install: this ensures version consistency.
npm:
service: appserver
cmd: /app/bin/npm
node:
service: appserver
cmd: /app/bin/npm
# Deprecated.
# Moved to scripts/sync-db.sh
sync-db:
service: appserver
description: This command has moved to a non-lando command, from app root run like this `scripts/sync-db.sh`.
cmd: 'echo "This command has moved to a non-lando command, from app root run like this `scripts/sync-db.sh`."'
# Deprecated.
# Moved to scripts/sync-files.sh
sync-files:
service: appserver
description: This command has moved to a non-lando command, from app root run like this `scripts/sync-files.sh`.
cmd: 'echo "This command has moved to a non-lando command, from app root run like this `scripts/sync-files.sh`."'
blackfire:
service: appserver
user: root
blackfire-agent:
description: Start/Stop/Restart Blackfire agent service
cmd:
- /etc/init.d/blackfire-agent
service: appserver
user: root