Compare commits

...

2 Commits

Author SHA1 Message Date
f0b5e56e43 Added healthcheck params in consul tags 2024-07-17 18:27:21 +02:00
c644f42ea9 Fixed missing AUTH_HANDLER_URL env issue 2024-07-17 17:52:35 +02:00
2 changed files with 3 additions and 2 deletions

View File

@@ -3,7 +3,6 @@ package config
import (
"os"
"github.com/gofiber/fiber/v2/log"
"github.com/joho/godotenv"
)
@@ -16,7 +15,7 @@ func init() {
func GetEnv(name string, defVal string) string {
env := os.Getenv(name)
if env == "" {
log.Panicf("Missing %s env variable", name)
return defVal
}
return env

View File

@@ -194,6 +194,8 @@ func (s *Service) getTags() []string {
"traefik.http.services." + s.Name + ".loadbalancer.server.scheme=http",
"traefik.http.services." + s.Name + ".loadbalancer.server.port=" + strconv.Itoa(s.port),
"traefik.http.services." + s.Name + ".loadbalancer.passhostheader=true",
"traefik.http.services." + s.Name + ".loadbalancer.healthcheck.interval=1",
"traefik.http.services." + s.Name + ".loadbalancer.healthcheck.timeout=1",
"traefik.tls.certificates.certfile=/certs/client.cert",
"traefik.tls.certificates.keyfile=/certs/client.key",
}