diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/docker.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/docker.go b/src/docker.go index d1d9051..c949815 100644 --- a/src/docker.go +++ b/src/docker.go @@ -53,13 +53,16 @@ func spawnCompanion(username string, accesscode string) { Config := &container.Config{ Image: "circus-companion:latest", Cmd: []string{"-username", username, "-accessCode", accesscode, "-sessionSalt", sessionSalt, "-vpnRemoteAddress", vpnRemoteAddress, "-vpnRemotePort", vpnRemotePort}, - + ExposedPorts: nat.PortSet{ + "8080/tcp": struct{}{}, + }, // Container labels used by traefik Labels: map[string]string{ "traefik.enable": "true", - "traefik.http.routers.companion.entrypoints": "web", - "traefik.http.routers.companion.rule": "Host(`companion.docker.localhost`)", - "traefik.http.services.companion.loadbalancer.server.port": "8080", + 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.services.%s.loadbalancer.server.port", username): "8080", + "traefik.docker.network": "circus", }, } |