metacore fix

This commit is contained in:
Pierre
2026-01-20 22:19:54 +01:00
parent ca1e58cf06
commit 8276fbb874
2 changed files with 14 additions and 3 deletions
+13 -3
View File
@@ -90,10 +90,13 @@ func (s *Service) buildServiceInfo() *ServiceInfo {
hostname, _ := os.Hostname() hostname, _ := os.Hostname()
ip := getLocalIP() ip := getLocalIP()
apiBase := fmt.Sprintf("http://%s:%d", ip, s.config.APIPort)
metaCoreBase := fmt.Sprintf("http://%s:%d", ip, s.config.HTTPPort)
return &ServiceInfo{ return &ServiceInfo{
Name: s.config.ServiceName, Name: s.config.ServiceName,
Version: s.config.ServiceVersion, Version: s.config.ServiceVersion,
API: fmt.Sprintf("http://%s:%d", ip, s.config.APIPort), API: apiBase,
Status: "running", Status: "running",
PID: os.Getpid(), PID: os.Getpid(),
Hostname: hostname, Hostname: hostname,
@@ -101,8 +104,15 @@ func (s *Service) buildServiceInfo() *ServiceInfo {
LastHeartbeat: time.Now().UTC().Format(time.RFC3339), LastHeartbeat: time.Now().UTC().Format(time.RFC3339),
Capabilities: []string{"meta-core"}, Capabilities: []string{"meta-core"},
Endpoints: map[string]string{ Endpoints: map[string]string{
"health": fmt.Sprintf("http://%s:%d/health", ip, s.config.HTTPPort), // meta-core sidecar endpoints (port 9000)
"meta": fmt.Sprintf("http://%s:%d/meta", ip, s.config.HTTPPort), "health": metaCoreBase + "/health",
"meta": metaCoreBase + "/meta",
"leader": metaCoreBase + "/leader",
"services": metaCoreBase + "/services",
// main service endpoints (port 80)
"api": apiBase + "/api",
"webdav": apiBase + "/webdav",
"callback": apiBase + "/api/plugins/callback",
}, },
} }
} }
+1
View File
@@ -50,6 +50,7 @@ func (rm *RedisManager) Start() error {
args := []string{ args := []string{
"--port", fmt.Sprintf("%d", rm.config.RedisPort), "--port", fmt.Sprintf("%d", rm.config.RedisPort),
"--bind", "0.0.0.0", "--bind", "0.0.0.0",
"--protected-mode", "no",
"--dir", dataDir, "--dir", dataDir,
"--appendonly", "yes", "--appendonly", "yes",
"--appendfilename", "appendonly.aof", "--appendfilename", "appendonly.aof",