Default to in-memory registry in single-binary mode

This avoids various issues of the old "mdns" default. At least for the simple
single process setup (#3134, #4597). When starting the services individually we
still default to "mdns".
This commit is contained in:
Ralf Haferkamp
2022-09-21 17:50:06 +02:00
committed by Ralf Haferkamp
parent 01650a5023
commit 8f2bf0ed9c
4 changed files with 56 additions and 25 deletions
+3
View File
@@ -4,6 +4,7 @@ import (
"github.com/owncloud/ocis/v2/ocis-pkg/config"
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
"github.com/owncloud/ocis/v2/ocis-pkg/registry"
"github.com/owncloud/ocis/v2/ocis/pkg/register"
"github.com/owncloud/ocis/v2/ocis/pkg/runtime"
"github.com/urfave/cli/v2"
@@ -19,6 +20,8 @@ func Server(cfg *config.Config) *cli.Command {
return configlog.ReturnError(parser.ParseConfig(cfg, false))
},
Action: func(c *cli.Context) error {
// Prefer the in-memory registry as the default when running in single-binary mode
registry.Configure("memory")
r := runtime.New(cfg)
return r.Start()
},