Skip to content

Commit

Permalink
[merge] pull request #2593
Browse files Browse the repository at this point in the history
  • Loading branch information
ddollar committed Apr 11, 2018
2 parents a3a1987 + 1b30790 commit 07c6444
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions provider/local/service.go
Expand Up @@ -19,16 +19,17 @@ func (p *Provider) ServiceList(app string) (structs.Services, error) {
ss := structs.Services{}

for _, s := range m.Services {
domain := ""
svc := structs.Service{Name: s.Name}

if s.Port.Port > 0 {
domain = fmt.Sprintf("%s.%s.%s", s.Name, app, p.Name)
svc.Domain = fmt.Sprintf("%s.%s.%s", s.Name, app, p.Name)
svc.Ports = []structs.ServicePort{
{Balancer: 80, Container: s.Port.Port},
{Balancer: 443, Container: s.Port.Port},
}
}

ss = append(ss, structs.Service{
Name: s.Name,
Domain: domain,
})
ss = append(ss, svc)
}

return ss, log.Success()
Expand Down

0 comments on commit 07c6444

Please sign in to comment.