Skip to content

Commit 6fb8871

Browse files
committed
Make Docker preview host ports configurable
1 parent 08e6f0b commit 6fb8871

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ services:
1717
hub:
1818
build: ./sorrel-hub
1919
ports:
20-
- "3000:3000"
20+
- "${SORREL_HUB_PORT:-3000}:3000"
2121
environment:
2222
HOST: "0.0.0.0"
2323
PORT: "3000"
@@ -35,7 +35,7 @@ services:
3535
hub-web:
3636
build: ./sorrel-hub-web
3737
ports:
38-
- "5180:5180"
38+
- "${SORREL_HUB_WEB_PORT:-5180}:5180"
3939
environment:
4040
HOST: "0.0.0.0"
4141
PORT: "5180"
@@ -47,7 +47,7 @@ services:
4747
web:
4848
build: ./sorrel-web
4949
ports:
50-
- "4173:80"
50+
- "${SORREL_WEB_PORT:-4173}:80"
5151

5252
volumes:
5353
hub-data:

docs/GETTING_STARTED.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ parked on a normal `git/<branch>` lane for explicit merge resolution.
8484
docker compose up --build
8585
```
8686

87+
If a preview port is occupied, override it with `SORREL_HUB_PORT`,
88+
`SORREL_HUB_WEB_PORT`, or `SORREL_WEB_PORT` before running Compose.
89+
8790
| Service | URL |
8891
| --- | --- |
8992
| Hub API | http://localhost:3000 |

0 commit comments

Comments
 (0)