forked from ampproject/amphtml
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.lando.yml
78 lines (74 loc) · 2.99 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
# This is a configuration file for a Lando-based local dev environment for amphtml.
# It is an alternative to the existing local development environment to what is described in the Getting Started
# End-to-end guide <https://github.com/ampproject/amphtml/blob/master/contributing/getting-started-e2e.md>.
#
# This environment allows you to encapsulate the amphtml development environment inside of a Docker container.
# Instead of accessing <http://localhost:8000>, this environment can be accessed via <https://amphtml.lando.site>.
#
# Getting started:
# 1. Install the latest release of Lando per <https://docs.lando.dev/basics/installation.html>.
# 2. You should also add this entry to your /etc/hosts file:
# 127.0.0.1 amphtml.lndo.site
# 3. Trust the default Lando CA on your machine so you can access amphtml.lando.site without any SSL warnings.
# See <https://docs.devwithlando.io/config/security.html#ssltls>.
# 4. Run `lando start`.
# 5. You should then be able to access <https://amphtml.lando.site> in your browser.
# 6. If using the Local AMP Chrome Extension, open the popup and configure the Base URL to be https://amphtml.lando.site/
#
# Now instead of running `gulp` commands directly, you instead run `lando gulp`. Additionally, some of the common gulp
# commands have shortcuts, so you can run `lando watch` instead of `lando gulp watch`. For a full list of the shortcuts
# run `lando help`.
#
# For details on the file format, see <https://docs.lando.dev/config/lando.html>.
# For more context on this Lando environment for amphtml, see <https://github.com/ampproject/amphtml/pull/23213>.
name: amphtml
services:
appserver:
type: node
install_dependencies_as_root:
- curl --compressed -o- -L https://yarnpkg.com/install.sh | bash
- apt-get update && apt-get install -y openjdk-8-jdk && apt-get install -y ant && apt-get clean
- apt-get install -y openjdk-7-jre protobuf-compiler python2.7 python-protobuf
build:
- yarn global add gulp-cli
- yarn
run_as_root:
- echo "127.0.0.1 amphtml.lndo.site" >> /etc/hosts
command: cd /app && yarn gulp serve --port=80 --host=0.0.0.0
tooling:
yarn:
service: appserver
gulp:
service: appserver
cmd: 'yarn gulp'
watch:
service: appserver
cmd: 'yarn gulp watch'
description: 'Watches for changes in files, re-builds when detected'
lint:
service: appserver
cmd: 'yarn gulp lint'
description: 'Validates against Google Closure Linter'
check-types:
service: appserver
cmd: 'yarn gulp check-types'
description: 'Check source code for JS type errors'
dist:
service: appserver
cmd: 'yarn gulp dist'
description: 'Build production binaries'
unit:
service: appserver
cmd: 'yarn gulp unit'
description: 'Run unit tests'
integration:
service: appserver
cmd: 'yarn gulp integration'
description: 'Run integration tests'
e2e:
service: appserver
cmd: 'yarn gulp e2e'
description: 'Runs e2e tests'
proxy:
appserver:
- amphtml.lndo.site