enable phoenix on the reserved port

This commit is contained in:
A.Unger
2019-12-13 10:35:23 +01:00
parent f74995a626
commit ff60245e83

View File

@@ -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)
}