Fix consul registration
This commit is contained in:
parent
e5786be62b
commit
baf252ee0a
@ -112,7 +112,7 @@ func (s *Service) check() (bool, error) {
|
||||
|
||||
func (s *Service) getTags() []string {
|
||||
fullName := fmt.Sprintf("%s_%s", s.Name, s.AppID)
|
||||
bFullAddr := fmt.Sprintf("http://%s:%d", s.IP, s.Port)
|
||||
bFullAddr := fmt.Sprintf("http://%s:%d/", s.IP, s.Port)
|
||||
|
||||
tags := []string{
|
||||
"traefik.enable=true",
|
||||
@ -123,8 +123,8 @@ func (s *Service) getTags() []string {
|
||||
"traefik.http.routers." + s.Name + ".tls=true",
|
||||
// "traefik.http.services." + s.Name + ".loadbalancer.server.scheme=http",
|
||||
// "traefik.http.services." + s.Name + ".loadbalancer.server.port=" + port,
|
||||
"traefik.http.services." + s.Name + ".loadbalancer.servers." + fullName + "=" + bFullAddr,
|
||||
"traefik.http.services." + s.Name + ".loadbalancer.passhostheader=false",
|
||||
"traefik.http.services." + s.Name + ".loadbalancer.servers." + fullName + "=" + bFullAddr,
|
||||
"traefik.http.middlewares.compress.compress=true",
|
||||
"traefik.http.middlewares.requestid.plugin.requestid.headerName=X-Request-ID",
|
||||
// "traefik.http.services." + fullName + ".loadbalancer.healthcheck.path=/health",
|
||||
|
Loading…
Reference in New Issue
Block a user