You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,8 @@ Usage
11
11
12
12
Launch your application container that exposes port 80:
13
13
14
-
docker run -d --name web1 tutum/hello-world
15
-
docker run -d --name web2 tutum/hello-world
14
+
docker run -d --name web1 dockercloud/hello-world
15
+
docker run -d --name web2 dockercloud/hello-world
16
16
17
17
Then, run `dockercloud/haproxy` linking it to the target containers:
18
18
@@ -233,12 +233,12 @@ Use case scenarios
233
233
234
234
Use the following:
235
235
236
-
docker run -d --expose 80 --name webapp tutum/hello-world
236
+
docker run -d --expose 80 --name webapp dockercloud/hello-world
237
237
docker run -d --link webapp:webapp -p 80:80 dockercloud/haproxy
238
238
239
239
#### My webapp container exposes port 80 and database ports 8083/8086, and I want the proxy to listen in port 80 without my database ports added to haproxy
docker run -d --link webapp:webapp -p 80:80 dockercloud/haproxy
243
243
244
244
#### My webapp container exposes port 8080(or any other port), and I want the proxy to listen in port 8080
@@ -252,7 +252,7 @@ Use the following:
252
252
253
253
Use the following:
254
254
255
-
docker run -d -e SSL_CERT="YOUR_CERT_TEXT" --name webapp tutum/hello-world
255
+
docker run -d -e SSL_CERT="YOUR_CERT_TEXT" --name webapp dockercloud/hello-world
256
256
docker run -d --link webapp:webapp -p 443:443 -p 80:80 dockercloud/haproxy
257
257
258
258
or
@@ -267,47 +267,47 @@ The certificate in `YOUR_CERT_TEXT` is a combination of private key followed by
267
267
268
268
Use the following:
269
269
270
-
docker run -d -e FORCE_SSL=yes -e SSL_CERT="YOUR_CERT_TEXT" --name webapp tutum/hello-world
270
+
docker run -d -e FORCE_SSL=yes -e SSL_CERT="YOUR_CERT_TEXT" --name webapp dockercloud/hello-world
271
271
docker run -d --link webapp:webapp -p 443:443 dockercloud/haproxy
272
272
273
273
#### I want to set up virtual host routing by domain
274
274
275
275
Virtual hosts can be configured by the proxy reading linked container environment variables (`VIRTUAL_HOST`). Here is an example:
276
276
277
-
docker run -d -e VIRTUAL_HOST="www.webapp1.com, www.webapp1.org" --name webapp1 tutum/hello-world
277
+
docker run -d -e VIRTUAL_HOST="www.webapp1.com, www.webapp1.org" --name webapp1 dockercloud/hello-world
278
278
docker run -d -e VIRTUAL_HOST=www.webapp2.com --name webapp2 your/webapp2
279
279
docker run -d --link webapp1:webapp1 --link webapp2:webapp2 -p 80:80 dockercloud/haproxy
280
280
281
281
In the example above, when you access `http://www.webapp1.com` or `http://www.webapp1.org`, it will show the service running in container `webapp1`, and `http://www.webapp2.com` will go to container `webapp2`.
282
282
283
283
If you use the following:
284
284
285
-
docker run -d -e VIRTUAL_HOST=www.webapp1.com --name webapp1 tutum/hello-world
286
-
docker run -d -e VIRTUAL_HOST=www.webapp2.com --name webapp2-1 tutum/hello-world
287
-
docker run -d -e VIRTUAL_HOST=www.webapp2.com --name webapp2-2 tutum/hello-world
285
+
docker run -d -e VIRTUAL_HOST=www.webapp1.com --name webapp1 dockercloud/hello-world
286
+
docker run -d -e VIRTUAL_HOST=www.webapp2.com --name webapp2-1 dockercloud/hello-world
287
+
docker run -d -e VIRTUAL_HOST=www.webapp2.com --name webapp2-2 dockercloud/hello-world
When you access `http://www.webapp1.com`, it will show the service running in container `webapp1`, and `http://www.webapp2.com` will go to both containers `webapp2-1` and `webapp2-2` using round robin (or whatever is configured in `BALANCE`).
291
291
292
292
#### I want all my `*.node.io` domains point to my service
293
293
294
-
docker run -d -e VIRTUAL_HOST="*.node.io" --name webapp tutum/hello-world
294
+
docker run -d -e VIRTUAL_HOST="*.node.io" --name webapp dockercloud/hello-world
295
295
docker run -d --link webapp:webapp -p 80:80 dockercloud/haproxy
296
296
297
297
#### I want `web.example.com` go to one service and `*.example.com` go to another service
298
298
299
-
docker run -d -e VIRTUAL_HOST="web.example.com" -e VIRTUAL_HOST_WEIGHT=1 --name webapp tutum/hello-world
300
-
docker run -d -e VIRTUAL_HOST="*.example.com" -e VIRTUAL_HOST_WEIGHT=0 --name app tutum/hello-world
299
+
docker run -d -e VIRTUAL_HOST="web.example.com" -e VIRTUAL_HOST_WEIGHT=1 --name webapp dockercloud/hello-world
300
+
docker run -d -e VIRTUAL_HOST="*.example.com" -e VIRTUAL_HOST_WEIGHT=0 --name app dockercloud/hello-world
301
301
docker run -d --link webapp:webapp --link app:app -p 80:80 dockercloud/haproxy
302
302
303
303
#### I want all the requests to path `/path` point to my service
304
304
305
-
docker run -d -e VIRTUAL_HOST="*/path, */path/*" --name webapp tutum/hello-world
305
+
docker run -d -e VIRTUAL_HOST="*/path, */path/*" --name webapp dockercloud/hello-world
306
306
docker run -d --link webapp:webapp -p 80:80 dockercloud/haproxy
307
307
308
308
#### I want all the static html request point to my service
309
309
310
-
docker run -d -e VIRTUAL_HOST="*/*.htm, */*.html" --name webapp tutum/hello-world
310
+
docker run -d -e VIRTUAL_HOST="*/*.htm, */*.html" --name webapp dockercloud/hello-world
311
311
docker run -d --link webapp:webapp -p 80:80 dockercloud/haproxy
312
312
313
313
#### I want to see stats of HAProxy
@@ -318,8 +318,8 @@ When you access `http://www.webapp1.com`, it will show the service running in co
318
318
319
319
Replace `<subdomain>` and `<port>` with your the values matching your papertrailapp account:
0 commit comments