From 2dede8045bc5a43acddd5c0b11393545f7e4fcdf Mon Sep 17 00:00:00 2001 From: Michael Irwin Date: Thu, 2 Nov 2023 11:48:23 -0400 Subject: [PATCH 1/2] Adjust name of debug launch config --- .vscode/launch.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index bb9e476cad..3e9f0bd7ac 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,7 @@ "version": "0.2.0", "configurations": [ { - "name": "Note: Results debugger", + "name": "Node: Results debugger", "type": "node", "request": "attach", "port": 9229, From 620c76c7156822730658982406124741306e976f Mon Sep 17 00:00:00 2001 From: Michael Irwin Date: Thu, 10 Oct 2024 10:58:25 -0400 Subject: [PATCH 2/2] 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. --- README.md | 2 +- docker-compose.images.yml | 4 ++-- docker-compose.yml | 4 ++-- docker-stack.yml | 4 ++-- k8s-specifications/result-service.yaml | 2 +- k8s-specifications/vote-service.yaml | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 8c3ce44c03..8516424ba1 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Run in this directory to build and run the app: docker compose up ``` -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). +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). 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: diff --git a/docker-compose.images.yml b/docker-compose.images.yml index 8b2e7d9ac7..8909aae794 100644 --- a/docker-compose.images.yml +++ b/docker-compose.images.yml @@ -11,7 +11,7 @@ services: redis: condition: service_healthy ports: - - "5000:80" + - "8080:80" networks: - front-tier - back-tier @@ -22,7 +22,7 @@ services: db: condition: service_healthy ports: - - "5001:80" + - "8081:80" networks: - front-tier - back-tier diff --git a/docker-compose.yml b/docker-compose.yml index 3ee1bb53b5..5915ffd741 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,7 +19,7 @@ services: volumes: - ./vote:/usr/local/app ports: - - "5000:80" + - "8080:80" networks: - front-tier - back-tier @@ -34,7 +34,7 @@ services: volumes: - ./result:/usr/local/app ports: - - "5001:80" + - "8081:80" - "127.0.0.1:9229:9229" networks: - front-tier diff --git a/docker-stack.yml b/docker-stack.yml index 0d00b6a202..356b944caf 100644 --- a/docker-stack.yml +++ b/docker-stack.yml @@ -24,7 +24,7 @@ services: vote: image: dockersamples/examplevotingapp_vote ports: - - 5000:80 + - 8080:80 networks: - frontend deploy: @@ -33,7 +33,7 @@ services: result: image: dockersamples/examplevotingapp_result ports: - - 5001:80 + - 8081:80 networks: - backend diff --git a/k8s-specifications/result-service.yaml b/k8s-specifications/result-service.yaml index f20e3b1fc6..0fed5e0cc5 100644 --- a/k8s-specifications/result-service.yaml +++ b/k8s-specifications/result-service.yaml @@ -8,7 +8,7 @@ spec: type: NodePort ports: - name: "result-service" - port: 5001 + port: 8081 targetPort: 80 nodePort: 31001 selector: diff --git a/k8s-specifications/vote-service.yaml b/k8s-specifications/vote-service.yaml index eae29ffcc3..d7a05b5513 100644 --- a/k8s-specifications/vote-service.yaml +++ b/k8s-specifications/vote-service.yaml @@ -8,7 +8,7 @@ spec: type: NodePort ports: - name: "vote-service" - port: 5000 + port: 8080 targetPort: 80 nodePort: 31000 selector: