Skip to content

Use example.com for documentation #279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions swarm/swarm_at_scale/deploy-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ command below, look for the value constraint.
$ docker -H $(docker-machine ip manager):3376 run -t -d \
-p 80:80 \
--label=interlock.hostname=results \
--label=interlock.domain=myenterprise.com \
--label=interlock.domain=myenterprise.example.com \
-e constraint:com.function==dbstore \
--net="voteapp" \
--name results-app docker/example-voting-app-result-app
Expand All @@ -146,7 +146,7 @@ command below, look for the value constraint.
$ docker -H $(docker-machine ip manager):3376 run -t -d \
-p 80:80 \
--label=interlock.hostname=vote \
--label=interlock.domain=myenterprise.com \
--label=interlock.domain=myenterprise.example.com \
-e constraint:com.function==frontend01 \
--net="voteapp" \
--name voting-app01 docker/example-voting-app-voting-app
Expand All @@ -158,7 +158,7 @@ command below, look for the value constraint.
$ docker -H $(docker-machine ip manager):3376 run -t -d \
-p 80:80 \
--label=interlock.hostname=vote \
--label=interlock.domain=myenterprise.com \
--label=interlock.domain=myenterprise.example.com \
-e constraint:com.function==frontend02 \
--net="voteapp" \
--name voting-app02 docker/example-voting-app-voting-app
Expand All @@ -182,23 +182,23 @@ allow you to take advantage of the loadbalancer.
$ docker exec interlock cat /etc/conf/nginx.conf
... output snipped ...

upstream results.myenterprise.com {
zone results.myenterprise.com_backend 64k;
upstream results.myenterprise.example.com {
zone results.myenterprise.example.com_backend 64k;

server 192.168.99.111:80;

}
server {
listen 80;

server_name results.myenterprise.com;
server_name results.myenterprise.example.com;

location / {
proxy_pass http://results.myenterprise.com;
proxy_pass http://results.myenterprise.example.com;
}
}
upstream vote.myenterprise.com {
zone vote.myenterprise.com_backend 64k;
upstream vote.myenterprise.example.com {
zone vote.myenterprise.example.com_backend 64k;

server 192.168.99.109:80;
server 192.168.99.108:80;
Expand All @@ -207,19 +207,19 @@ allow you to take advantage of the loadbalancer.
server {
listen 80;

server_name vote.myenterprise.com;
server_name vote.myenterprise.example.com;

location / {
proxy_pass http://vote.myenterprise.com;
proxy_pass http://vote.myenterprise.example.com;
}
}

include /etc/conf/conf.d/*.conf;
}
```

The `http://vote.myenterprise.com` site configuration should point to either
frontend node. Requests to `http://results.myenterprise.com` go just to the
The `http://vote.myenterprise.example.com` site configuration should point to either
frontend node. Requests to `http://results.myenterprise.example.com` go just to the
single `dbstore` node where the `example-voting-app-result-app` is running.

3. On your local host, edit `/etc/hosts` file add the resolution for both these
Expand All @@ -240,14 +240,14 @@ sites.

Now, you can test your application.

1. Open a browser and navigate to the `http://vote.myenterprise.com` site.
1. Open a browser and navigate to the `http://vote.myenterprise.example.com` site.

You should see something similar to the following:

![](../images/vote-app-test.png)

2. Click on one of the two voting options.
3. Navigate to the `http://results.myenterprise.com` site to see the results.
3. Navigate to the `http://results.myenterprise.example.com` site to see the results.
4. Try changing your vote.

You'll see both sides change as you switch your vote.
Expand Down Expand Up @@ -392,8 +392,8 @@ result file</a>
```bash
$ docker restart nginx
```
11. Check your work again by visiting the `http://vote.myenterprise.com` and
`http://results.myenterprise.com` again.
11. Check your work again by visiting the `http://vote.myenterprise.example.com` and
`http://results.myenterprise.example.com` again.

12. You can view the logs on an individual container.

Expand Down
4 changes: 2 additions & 2 deletions swarm/swarm_at_scale/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
- voteapp
labels:
interlock.hostname: "vote"
interlock.domain: "myenterprise.com"
interlock.domain: "myenterprise.example.com"
result-app:
image: docker/example-voting-app-result-app
ports:
Expand All @@ -18,7 +18,7 @@ services:
- voteapp
labels:
interlock.hostname: "results"
interlock.domain: "myenterprise.com"
interlock.domain: "myenterprise.example.com"
worker:
image: docker/example-voting-app-worker
networks:
Expand Down