metacore fix
This commit is contained in:
@@ -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",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user