Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 003bf2bb88 | |||
| 03ec5a0a5a |
@@ -84,7 +84,6 @@ func (s *Service) Register() error {
|
|||||||
interval := s.TTL - time.Second*2
|
interval := s.TTL - time.Second*2
|
||||||
ticker := time.NewTicker(interval)
|
ticker := time.NewTicker(interval)
|
||||||
for range ticker.C {
|
for range ticker.C {
|
||||||
fmt.Println("HC call: ", time.Now().String())
|
|
||||||
_, err := s.healthCheck()
|
_, err := s.healthCheck()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("TTL Error: %v\n", err)
|
fmt.Printf("TTL Error: %v\n", err)
|
||||||
@@ -133,7 +132,7 @@ func (s *Service) healthCheck() (bool, error) {
|
|||||||
func (s *Service) getTags() []string {
|
func (s *Service) getTags() []string {
|
||||||
tags := []string{
|
tags := []string{
|
||||||
"traefik.enable=true",
|
"traefik.enable=true",
|
||||||
"traefik.http.routers." + s.Name + ".rule=Host(`" + s.Domain + "`)",
|
"traefik.http.routers." + s.Name + ".rule=Headers(`X-API-SERVICE`, `" + s.Domain + "`)",
|
||||||
"traefik.http.routers." + s.Name + ".entryPoints=https",
|
"traefik.http.routers." + s.Name + ".entryPoints=https",
|
||||||
"traefik.http.routers." + s.Name + ".tls=true",
|
"traefik.http.routers." + s.Name + ".tls=true",
|
||||||
"traefik.http.routers." + s.Name + ".service=" + s.Name,
|
"traefik.http.routers." + s.Name + ".service=" + s.Name,
|
||||||
|
|||||||
Reference in New Issue
Block a user