From ff60245e83885cba6b80469c534b3ddbead4a4df Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Fri, 13 Dec 2019 10:35:23 +0100 Subject: [PATCH] enable phoenix on the reserved port --- pkg/command/phoenix.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkg/command/phoenix.go b/pkg/command/phoenix.go index 8fad51110b..6affd112fb 100644 --- a/pkg/command/phoenix.go +++ b/pkg/command/phoenix.go @@ -11,6 +11,7 @@ import ( "github.com/owncloud/ocis-phoenix/pkg/metrics" "github.com/owncloud/ocis-phoenix/pkg/server/http" "github.com/owncloud/ocis/pkg/config" + "github.com/owncloud/ocis/pkg/register" ) // PhoenixCommand is the entrypoint for the phoenix command. @@ -31,7 +32,7 @@ func PhoenixCommand(cfg *config.Config) cli.Command { } // PhoenixHandler defines the direct server handler. -func PhoenixHandler(ctx context.Context, cancel context.CancelFunc, gr run.Group, cfg *config.Config) error { +func PhoenixHandler(ctx context.Context, cancel context.CancelFunc, gr *run.Group, cfg *config.Config) error { scfg := configurePhoenix(cfg) logger := command.NewLogger(scfg) m := metrics.New() @@ -72,12 +73,13 @@ func configurePhoenix(cfg *config.Config) *svcconfig.Config { cfg.Phoenix.Log.Pretty = cfg.Log.Pretty cfg.Phoenix.Log.Color = cfg.Log.Color cfg.Phoenix.Tracing.Enabled = false + cfg.Phoenix.HTTP.Addr = "localhost:9100" cfg.Phoenix.HTTP.Root = "/" return cfg.Phoenix } -// func init() { -// register.AddCommand(PhoenixCommand) -// register.AddHandler(PhoenixHandler) -// } +func init() { + register.AddCommand(PhoenixCommand) + register.AddHandler(PhoenixHandler) +}