From 8276fbb874a87c045dd37585adb5d87e9bae81b1 Mon Sep 17 00:00:00 2001 From: Pierre Date: Tue, 20 Jan 2026 22:19:54 +0100 Subject: [PATCH] metacore fix --- internal/discovery/service.go | 16 +++++++++++++--- internal/leader/redis.go | 1 + 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/internal/discovery/service.go b/internal/discovery/service.go index 30b2699..0bb2cbe 100644 --- a/internal/discovery/service.go +++ b/internal/discovery/service.go @@ -90,10 +90,13 @@ func (s *Service) buildServiceInfo() *ServiceInfo { hostname, _ := os.Hostname() ip := getLocalIP() + apiBase := fmt.Sprintf("http://%s:%d", ip, s.config.APIPort) + metaCoreBase := fmt.Sprintf("http://%s:%d", ip, s.config.HTTPPort) + return &ServiceInfo{ Name: s.config.ServiceName, Version: s.config.ServiceVersion, - API: fmt.Sprintf("http://%s:%d", ip, s.config.APIPort), + API: apiBase, Status: "running", PID: os.Getpid(), Hostname: hostname, @@ -101,8 +104,15 @@ func (s *Service) buildServiceInfo() *ServiceInfo { LastHeartbeat: time.Now().UTC().Format(time.RFC3339), Capabilities: []string{"meta-core"}, Endpoints: map[string]string{ - "health": fmt.Sprintf("http://%s:%d/health", ip, s.config.HTTPPort), - "meta": fmt.Sprintf("http://%s:%d/meta", ip, s.config.HTTPPort), + // meta-core sidecar endpoints (port 9000) + "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", }, } } diff --git a/internal/leader/redis.go b/internal/leader/redis.go index 40899fe..5ac7fb3 100644 --- a/internal/leader/redis.go +++ b/internal/leader/redis.go @@ -50,6 +50,7 @@ func (rm *RedisManager) Start() error { args := []string{ "--port", fmt.Sprintf("%d", rm.config.RedisPort), "--bind", "0.0.0.0", + "--protected-mode", "no", "--dir", dataDir, "--appendonly", "yes", "--appendfilename", "appendonly.aof",