Skip to content
This repository was archived by the owner on Aug 4, 2023. It is now read-only.

Commit 99ea370

Browse files
ModulesUnraveledgitbook-bot
authored andcommitted
GitBook: [#127] No subject
1 parent cef7be6 commit 99ea370

File tree

1 file changed

+50
-44
lines changed

1 file changed

+50
-44
lines changed

emulsify-drupal/emulsify-drupal/advanced-usage/lando-environments.md

+50-44
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
description: Use Lando to make your development environment portable
33
---
44

5-
# Lando
5+
# Lando Environments
66

77
### Why use Lando?
8+
89
1. Standardizing local environments is simple and effective.
910
2. Your development environment is portable, so you only need Docker and Lando to develop.
1011
3. Complicated infrastructure can be stood up quickly.
@@ -14,45 +15,48 @@ description: Use Lando to make your development environment portable
1415

1516
### Dependencies
1617

17-
- [Docker](https://docs.docker.com/get-docker/)
18-
- [Lando](https://lando.dev/download/)
18+
* [Docker](https://docs.docker.com/get-docker/)
19+
* [Lando](https://lando.dev/download/)
1920

2021
### Basic Lando stack
2122

22-
1. The `drupal9` recipe can handle most the work for us
23-
```yaml
24-
recipe: drupal9
25-
```
26-
2. Emulsify needs port 6006 to be available for StorybookJS and port 32778 to be available for [Hot Reload](./hot-reload-drupal.md).
27-
```yaml
28-
services:
29-
appserver:
30-
overrides:
31-
ports:
32-
- 6006:6006
33-
- 32778:32778
34-
```
35-
3. Both NodeJS and NPM needs to be available at a project level. Using npm the emulsify cli command can also be installed. This and npm can both be made available via Lando tooling.
36-
```yaml
37-
services:
38-
appserver:
39-
build_as_root:
40-
- apt update -y && apt install -y apt-transport-https build-essential unzip
41-
- curl -sL https://deb.nodesource.com/setup_16.x | bash -
42-
- apt-get install -y nodejs
43-
- chown -R www-data /usr/lib/node_modules
44-
- chown -R www-data /usr/bin
45-
- npm install -g npm
46-
- npm install -g @emulsify/cli
47-
...
48-
tooling:
49-
node:
50-
service: appserver
51-
npm:
52-
service: appserver
53-
emulsify:
54-
service: appserver
55-
```
23+
1. The `drupal9` recipe can handle most the work for us
24+
25+
```yaml
26+
recipe: drupal9
27+
```
28+
2. Emulsify needs port 6006 to be available for StorybookJS and port 32778 to be available for [Hot Reload](hot-reload-drupal.md).
29+
30+
```yaml
31+
services:
32+
appserver:
33+
overrides:
34+
ports:
35+
- 6006:6006
36+
- 32778:32778
37+
```
38+
3. Both NodeJS and NPM needs to be available at a project level. Using npm the emulsify cli command can also be installed. This and npm can both be made available via Lando tooling.
39+
40+
```yaml
41+
services:
42+
appserver:
43+
build_as_root:
44+
- apt update -y && apt install -y apt-transport-https build-essential unzip
45+
- curl -sL https://deb.nodesource.com/setup_16.x | bash -
46+
- apt-get install -y nodejs
47+
- chown -R www-data /usr/lib/node_modules
48+
- chown -R www-data /usr/bin
49+
- npm install -g npm
50+
- npm install -g @emulsify/cli
51+
...
52+
tooling:
53+
node:
54+
service: appserver
55+
npm:
56+
service: appserver
57+
emulsify:
58+
service: appserver
59+
```
5660
5761
## Full example
5862
@@ -102,13 +106,15 @@ tooling:
102106
```
103107
104108
### Setup
105-
1. Run `composer create-project drupal/recommended-project my-project`
106-
See [Starting a Site Using Drupal Composer Project Templates](https://www.drupal.org/docs/develop/using-composer/starting-a-site-using-drupal-composer-project-templates) for more information on setting up a Drupal project with Composer.
109+
110+
1. Run `composer create-project drupal/recommended-project my-project` See [Starting a Site Using Drupal Composer Project Templates](https://www.drupal.org/docs/develop/using-composer/starting-a-site-using-drupal-composer-project-templates) for more information on setting up a Drupal project with Composer.
107111
2. Add the above lando.yml file to the project
108112
3. Run `lando start`
109113
4. After it builds you can then run these commands:
110-
- `lando node`
111-
- `lando npm`
112-
- `lando emulsify`
113-
- `lando drush`
114-
5. Follow the [Inside a Composer-Based Drupal Instance](https://www.drupal.org/docs/develop/using-composer/starting-a-site-using-drupal-composer-project-templates) steps to complete setting up Emulsify Drupal.
114+
115+
* `lando node`
116+
* `lando npm`
117+
* `lando emulsify`
118+
* `lando drush`
119+
120+
1. Follow the [Inside a Composer-Based Drupal Instance](https://docs.emulsify.info/emulsify-drupal/emulsify-drupal#inside-a-composer-based-drupal-instance) steps to complete setting up Emulsify Drupal.

0 commit comments

Comments
 (0)