Compare commits

...

4 Commits

Author SHA1 Message Date
3394040a8c Fixed consul registered address 2024-07-17 15:07:09 +02:00
bc439fd4d2 revert consul router rules 2024-07-16 22:23:12 +02:00
16cfa5fead fix consul router rules 2024-07-16 22:17:51 +02:00
044c32e783 fix consul router rules 2024-07-16 21:53:59 +02:00

View File

@@ -74,7 +74,7 @@ func (s *Service) Register() error {
ID: s.GetID(),
// Kind: consul.ServiceKindConnectProxy,
Name: s.Name,
Address: s.domain,
Address: s.GetFullAddr(),
Port: s.port,
Tags: s.getTags(),
// Connect: &consul.AgentServiceConnect{Native: true},
@@ -178,7 +178,7 @@ func (s *Service) healthCheck() (bool, error) {
func (s *Service) getTags() []string {
tags := []string{
"traefik.enable=true",
"traefik.http.routers." + s.Name + ".rule=Host(`" + s.domain + "`) && PathPrefix(`" + s.pathPrefix + "`)",
"traefik.http.routers." + s.Name + ".rule=PathPrefix(`" + s.pathPrefix + "`)",
// "traefik.http.routers." + s.Name + ".rule=Host(`" + s.domain + "`)",
"traefik.http.routers." + s.Name + ".entryPoints=https",
// "traefik.http.routers." + s.Name + ".tls=true",