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

Commit 58bbdd6

Browse files
authored
Merge pull request #40 from emulsify-ds/feature/lando-documentation
Update to addressing ports in Lando to avoid network collisions.
2 parents 8a07a13 + fd38432 commit 58bbdd6

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

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

+14-13
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,6 @@ description: Use Lando to make your development environment portable
2525
```yaml
2626
recipe: drupal9
2727
```
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-
```
3828
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.
3929
4030
```yaml
@@ -57,6 +47,18 @@ description: Use Lando to make your development environment portable
5747
emulsify:
5848
service: appserver
5949
```
50+
3. Emulsify needs port `6006` to be available for StorybookJS and port `32778` to be available for [Hot Reload](./hot-reload-drupal.md).
51+
52+
By adding proxy address for browsersync.example.lndo.site and storybook.example.lndo.site that point to the ports needed, those applications can be accessible by navigating to the addresses (without the ports, like this: `http://storybook.example.lndo.site`) from outside the container services.
53+
54+
Since we are using proxies instead of forwarding ports directly, multiple projects can make use of these ports simultaneously.
55+
```yaml
56+
proxy:
57+
appserver:
58+
- example.lndo.site
59+
- browsersync.example.lndo.site:32778
60+
- storybook.example.lndo.site:6006
61+
```
6062

6163
## Full example
6264

@@ -77,9 +79,6 @@ services:
7779
overrides:
7880
environment:
7981
DRUSH_OPTIONS_URI: "https://example.lndo.site"
80-
ports:
81-
- 6006:6006
82-
- 32778:32778
8382
build:
8483
- composer install
8584
build_as_root:
@@ -93,6 +92,8 @@ services:
9392
proxy:
9493
appserver:
9594
- example.lndo.site
95+
- browsersync.example.lndo.site:32778
96+
- storybook.example.lndo.site:6006
9697
tooling:
9798
drush:
9899
service: appserver

0 commit comments

Comments
 (0)