File tree 2 files changed +8
-7
lines changed
developer-tools/nodejs/porting
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ Run db and application containers in the new bridge network
107
107
108
108
```
109
109
$ 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
111
111
```
112
112
113
113
Note: MONGO_URL environment variable directly uses ** mongo** container’s name
@@ -154,7 +154,7 @@ services:
154
154
app:
155
155
image: lucj/message-app
156
156
ports:
157
- - "80 "
157
+ - "1337 "
158
158
links:
159
159
- mongo
160
160
depends_on:
@@ -221,7 +221,7 @@ services:
221
221
app:
222
222
image: message-app
223
223
expose:
224
- - "80 "
224
+ - "1337 "
225
225
links:
226
226
- mongo
227
227
depends_on:
Original file line number Diff line number Diff line change 1
1
# Deployment on a Docker Swarm
2
2
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.
4
4
5
5
## Creation of a key-value store
6
6
35
35
$ docker-machine create \
36
36
-d virtualbox \
37
37
--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" \
39
40
--engine-opt="cluster-advertise=eth1:2376" \
40
41
demo1
41
42
```
@@ -103,7 +104,7 @@ http {
103
104
}
104
105
```
105
106
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:
107
108
108
109
```
109
110
# Create image
@@ -160,7 +161,7 @@ networks:
160
161
driver: overlay
161
162
```
162
163
163
- There are several important updates here
164
+ There are several important updates here
164
165
* usage of the lb-dns image for the load balancer service
165
166
* constraints to choose the nodes on which each service will run (needed in our example to illustrate the DNS round robin)
166
167
* creation of a new user-defined overlay network to enable each container to communicate with each other through their name
You can’t perform that action at this time.
0 commit comments