Skip to content

Commit 9bf2772

Browse files
authored
Allow to configure service port with Docker (#57)
If 8080 is already used by some other application.
1 parent 2f46f81 commit 9bf2772

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ To set up the API-Gateway, follow these steps:
3333
4. Run the service:
3434
`java -jar ./build/libs/api-gateway-1.0-SNAPSHOT.jar`
3535
5. Alternative run with Docker (requirement: have [Docker](https://docs.docker.com/get-docker/) installed and running)
36-
`docker-compose up --build`
37-
36+
`docker-compose --profile all up --build`. This can be configured with environment variables:
37+
- `WEBPORT` where the service will be available at (8080 by default)
3838

3939
The service will be accessible at `http://localhost:8080/api-gateway` by default.
4040

Diff for: docker-compose.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
dockerfile: Dockerfile
77
container_name: api-gateway
88
ports:
9-
- "8080:8080"
9+
- "${WEBPORT:-8080}:8080"
1010
restart: always
1111
profiles:
1212
- all

0 commit comments

Comments
 (0)