about summary refs log tree commit diff
path: root/src/docker.go
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-10-09 12:19:00 +0200
committerEmile <hanemile@protonmail.com>2019-10-09 12:19:00 +0200
commitfb16e34c1f1740c75f45dfb52e6d4d799f7e6682 (patch)
tree5a9889e243d6079ec662471e3b95b2cda8dce1d7 /src/docker.go
parentf331ae701b2dc7f78a14545b49db91e9436c6208 (diff)
reading the hostname von env vars
Diffstat (limited to 'src/docker.go')
-rw-r--r--src/docker.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/docker.go b/src/docker.go
index 76c90e9..5cc1411 100644
--- a/src/docker.go
+++ b/src/docker.go
@@ -65,7 +65,7 @@ func spawnCompanion(username string, accesscode string) {
 		Labels: map[string]string{
 			"traefik.enable": "true",
 			fmt.Sprintf("traefik.http.routers.%s.entrypoints", username):               "web",
-			fmt.Sprintf("traefik.http.routers.%s.rule", username):                      fmt.Sprintf("Host(`%s.docker.localhost`)", username),
+			fmt.Sprintf("traefik.http.routers.%s.rule", username):                      fmt.Sprintf("Host(`%s.%s`)", username, os.Getenv("HOSTNAME")),
 			fmt.Sprintf("traefik.http.services.%s.loadbalancer.server.port", username): "8080",
 			"traefik.docker.network": "circus",
 		},