Skip to content

Commit 7755c49

Browse files
author
Mano Marks
authored
Merge pull request docker#222 from andreykovalenko/issue-221-fix
fix issue 221 - incorrect port mapping
2 parents db3af06 + 6ba8595 commit 7755c49

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

developer-tools/nodejs/porting/4_single_host_networking.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Run db and application containers in the new bridge network
107107

108108
```
109109
$ docker run --name mongo --net mongonet -d mongo:3.2
110-
$ docker run --name app --net mongonet -p 8000:80” -d -e “MONGO_URL=mongodb://mongo/messageApp” message-app:v1
110+
$ docker run --name app --net mongonet -p 8000:1337 -d -e “MONGO_URL=mongodb://mongo/messageApp” message-app:v1
111111
```
112112

113113
Note: MONGO_URL environment variable directly uses **mongo** container’s name
@@ -154,7 +154,7 @@ services:
154154
app:
155155
image: lucj/message-app
156156
ports:
157-
- "80"
157+
- "1337"
158158
links:
159159
- mongo
160160
depends_on:
@@ -221,7 +221,7 @@ services:
221221
app:
222222
image: message-app
223223
expose:
224-
- "80"
224+
- "1337"
225225
links:
226226
- mongo
227227
depends_on:

developer-tools/nodejs/porting/6_deploy_on_swarm.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Deployment on a Docker Swarm
22

3-
As for the multi Docker host environment, a Docker Swarm requires a key value store to gather the nodes / containers configurations and states.
3+
As for the multi Docker host environment, a Docker Swarm requires a key value store to gather the nodes / containers configurations and states.
44

55
## Creation of a key-value store
66

@@ -35,7 +35,8 @@ demo0
3535
$ docker-machine create \
3636
-d virtualbox \
3737
--swarm \
38-
--swarm-discovery="consul://$(docker-machine ip consul):8500" \ --engine-opt="cluster-store=consul://$(docker-machine ip consul):8500" \
38+
--swarm-discovery="consul://$(docker-machine ip consul):8500" \
39+
--engine-opt="cluster-store=consul://$(docker-machine ip consul):8500" \
3940
--engine-opt="cluster-advertise=eth1:2376" \
4041
demo1
4142
```
@@ -103,7 +104,7 @@ http {
103104
}
104105
```
105106

106-
Let's build and publish the image of this load-balancer to Docker Hub:
107+
Let's build and publish the image of this load-balancer to Docker Hub:
107108

108109
```
109110
# Create image
@@ -160,7 +161,7 @@ networks:
160161
driver: overlay
161162
```
162163

163-
There are several important updates here
164+
There are several important updates here
164165
* usage of the lb-dns image for the load balancer service
165166
* constraints to choose the nodes on which each service will run (needed in our example to illustrate the DNS round robin)
166167
* creation of a new user-defined overlay network to enable each container to communicate with each other through their name

0 commit comments

Comments
 (0)