Skip to content

Commit

Permalink
ADD: web proxy example, FIX: issue #22
Browse files Browse the repository at this point in the history
  • Loading branch information
anak10thn committed Jun 1, 2017
1 parent b3c69d4 commit b43b008
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
48 changes: 48 additions & 0 deletions examples/web-proxy/traefik/orcinus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# testing :
#
# curl -H Host:whoami.traefik http://127.0.0.1
#
# Hostname: 8147a7746e7a
# IP: 127.0.0.1
# IP: ::1
# IP: 10.0.9.3
# IP: fe80::42:aff:fe00:903
# IP: 172.18.0.3
# IP: fe80::42:acff:fe12:3
# GET / HTTP/1.1
# Host: 10.0.9.3:80
# User-Agent: curl/7.35.0
# Accept: */*
# Accept-Encoding: gzip
# X-Forwarded-For: 192.168.99.1
# X-Forwarded-Host: 10.0.9.3:80
# X-Forwarded-Proto: http
# X-Forwarded-Server: 8fbc39271b4c


stack: "traefik"
services:
treafik:
image: "traefik"
ports:
- "80:80"
- "8080:8080"
constraint: "node.role==manager"
commands:
- "--docker"
- "--docker.swarmmode"
- "--docker.domain=traefik"
- "--docker.watch"
- "--web"
volumes:
- "docker"
whoami:
image: "emilevauge/whoami"
labels:
traefik.port: "80"

volumes:
docker:
type: "bind"
source: "/var/run/docker.sock"
target: "/var/run/docker.sock"
4 changes: 2 additions & 2 deletions lib/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Object.keys(this.manifest.services).forEach(function(service){
*/

if(cmd.indexOf("labels") >= 0){
container.Labels = app.labels;
spec.Labels = app.labels;
}

/*
Expand Down Expand Up @@ -339,7 +339,7 @@ parser.prototype.update = function(){
*/

if(app.labels){
container.Labels = app.labels;
spec.Labels = app.labels;
}

/*
Expand Down

0 comments on commit b43b008

Please sign in to comment.