forked from department-of-veterans-affairs/va.gov-cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.lando.yml
114 lines (109 loc) · 4.5 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
name: va-gov-cms
recipe: drupal8
config:
webroot: docroot
php: "7.2"
events:
# Mirrors what is in lando-entrypoint-app.sh, keep in sync with that file.
# @todo don't use absolute path, somehow lando is not detecting drush in path right now. Fix this.
post-db-import:
- appserver: cd $LANDO_WEBROOT && /app/docroot/vendor/bin/drush cache-rebuild -y
- appserver: cd $LANDO_WEBROOT && /app/docroot/vendor/bin/drush updatedb -y
- appserver: cd $LANDO_WEBROOT && /app/docroot/vendor/bin/drush config:import -y
- appserver: cd $LANDO_WEBROOT && /app/docroot/vendor/bin/drush cache-rebuild -y
# Runs composer install after app starts
post-start:
- appserver: cd $LANDO_MOUNT && composer install
# - appserver: cd $LANDO_MOUNT && npm install
# 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 -y"
# - "tar xvjf /app/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C /usr/local/share/"
# - "mv /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/bin/"
# - "cd /usr/bin"
# - "chmod +x phantomjs"
# Uncomment the below `xdebug: true` for Xdebug support
# @todo Change this to pull in a local Lando settings variable and use that boolean variable
# Run `lando rebuild` after uncommenting
#xdebug: true
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}
# 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"
node:
type: node
build:
- npm install
# - "cd $LANDO_MOUNT/docroot/themes/custom/vagov && npm install"
overrides:
environment:
BEHAT_PARAMS: '{"extensions" : {"Behat\\MinkExtension" : {"base_url" : "http://localhost/"}, "Drupal\\DrupalExtension" : {"drush" : { "root": "/app/docroot" }}}}'
ports:
- 3002:3002
- 3003:3003
image: node:10.13-jessie
globals:
gulp-cli: "latest"
# 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}
tooling:
drush:
cmd: /app/docroot/vendor/bin/drush
phantomjs:
service: appserver
description: "Run phantomjs commands"
phpunit:
service: appserver
description: "Run PHP Unit tests: lando phpunit. Syntax: lando phpunit {PATH-TO-TEST}"
cmd: /app/docroot/vendor/bin/phpunit --bootstrap=/app/docroot/vendor/weitzman/drupal-test-traits/src/bootstrap.php -c /app
behat:
service: appserver
description: "Run behat tests locally. Run from /tests dir."
cmd:
- /app/docroot/vendor/bin/behat
npm:
service: node
node:
service: node
nightwatch:
service: node
description: "Run nightwatch tests locally. Syntax: npm run-script nightwatch."
cmd:
- ./node_modules/.bin/nightwatch --tags accessibility
gulp:
service: node
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`."'
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`."'