Skip to content

Commit 620c76c

Browse files
committed
Change ports of vote/result ports from 5000/5001 to 8080/8081
The reasoning of this is because port 5000 is, by default, used by an AirPlay receiver process on Macs. While this can be turned off, we'd like this app to work without needing to adjust default configurations on a machine.
1 parent 2dede80 commit 620c76c

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Run in this directory to build and run the app:
1414
docker compose up
1515
```
1616

17-
The `vote` app will be running at [http://localhost:5000](http://localhost:5000), and the `results` will be at [http://localhost:5001](http://localhost:5001).
17+
The `vote` app will be running at [http://localhost:8080](http://localhost:8080), and the `results` will be at [http://localhost:8081](http://localhost:8081).
1818

1919
Alternately, if you want to run it on a [Docker Swarm](https://docs.docker.com/engine/swarm/), first make sure you have a swarm. If you don't, run:
2020

docker-compose.images.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ services:
1111
redis:
1212
condition: service_healthy
1313
ports:
14-
- "5000:80"
14+
- "8080:80"
1515
networks:
1616
- front-tier
1717
- back-tier
@@ -22,7 +22,7 @@ services:
2222
db:
2323
condition: service_healthy
2424
ports:
25-
- "5001:80"
25+
- "8081:80"
2626
networks:
2727
- front-tier
2828
- back-tier

docker-compose.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ services:
1919
volumes:
2020
- ./vote:/usr/local/app
2121
ports:
22-
- "5000:80"
22+
- "8080:80"
2323
networks:
2424
- front-tier
2525
- back-tier
@@ -34,7 +34,7 @@ services:
3434
volumes:
3535
- ./result:/usr/local/app
3636
ports:
37-
- "5001:80"
37+
- "8081:80"
3838
- "127.0.0.1:9229:9229"
3939
networks:
4040
- front-tier

docker-stack.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ services:
2424
vote:
2525
image: dockersamples/examplevotingapp_vote
2626
ports:
27-
- 5000:80
27+
- 8080:80
2828
networks:
2929
- frontend
3030
deploy:
@@ -33,7 +33,7 @@ services:
3333
result:
3434
image: dockersamples/examplevotingapp_result
3535
ports:
36-
- 5001:80
36+
- 8081:80
3737
networks:
3838
- backend
3939

k8s-specifications/result-service.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ spec:
88
type: NodePort
99
ports:
1010
- name: "result-service"
11-
port: 5001
11+
port: 8081
1212
targetPort: 80
1313
nodePort: 31001
1414
selector:

k8s-specifications/vote-service.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ spec:
88
type: NodePort
99
ports:
1010
- name: "vote-service"
11-
port: 5000
11+
port: 8080
1212
targetPort: 80
1313
nodePort: 31000
1414
selector:

0 commit comments

Comments
 (0)