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

Commit 8bd70e7

Browse files
committed
Update to addressing ports in Lando to avoid network collisions.
1 parent 3bed8e2 commit 8bd70e7

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

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

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,7 @@ description: Use Lando to make your development environment portable
2323
```yaml
2424
recipe: drupal9
2525
```
26-
2. Emulsify needs port 6006 to be available for StorybookJS and port 32778 to be available for
27-
[Hot Reload](./hot-reload-drupal.md).
28-
```yaml
29-
services:
30-
appserver:
31-
overrides:
32-
ports:
33-
- 6006:6006
34-
- 32778:32778
35-
```
36-
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.
26+
2. 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.
3727
```yaml
3828
services:
3929
appserver:
@@ -54,6 +44,18 @@ description: Use Lando to make your development environment portable
5444
emulsify:
5545
service: appserver
5646
```
47+
3. Emulsify needs port 6006 to be available for StorybookJS and port 32778 to be available for [Hot Reload](./hot-reload-drupal.md).
48+
49+
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 from outside the container services.
50+
51+
Since we are using proxies instead of forwarding ports directly, multiple projects can make use of these ports simultaneously.
52+
```yaml
53+
proxy:
54+
appserver:
55+
- example.lndo.site
56+
- browsersync.example.lndo.site:32778
57+
- storybook.example.lndo.site:6006
58+
```
5759
5860
## Full example
5961
@@ -74,9 +76,6 @@ services:
7476
overrides:
7577
environment:
7678
DRUSH_OPTIONS_URI: "https://example.lndo.site"
77-
ports:
78-
- 6006:6006
79-
- 32778:32778
8079
build:
8180
- composer install
8281
build_as_root:
@@ -90,6 +89,8 @@ services:
9089
proxy:
9190
appserver:
9291
- example.lndo.site
92+
- browsersync.example.lndo.site:32778
93+
- storybook.example.lndo.site:6006
9394
tooling:
9495
drush:
9596
service: appserver

0 commit comments

Comments
 (0)