migrate store to the new config scheme

This commit is contained in:
A.Unger
2021-11-05 14:10:25 +01:00
parent ad72f7574c
commit 99f28e601c
8 changed files with 178 additions and 84 deletions
+5 -5
View File
@@ -23,12 +23,12 @@ func Server(cfg *config.Config) *cli.Command {
Usage: "Start integrated server",
Flags: flagset.ServerWithConfig(cfg),
Before: func(ctx *cli.Context) error {
logger := NewLogger(cfg)
// When running on single binary mode the before hook from the root command won't get called. We manually
// call this before hook from ocis command, so the configuration can be loaded.
if !cfg.Supervised {
return ParseConfig(ctx, cfg)
if err := ParseConfig(ctx, cfg); err != nil {
return err
}
logger := NewLogger(cfg)
logger.Debug().Str("service", "store").Msg("ignoring config file parsing when running supervised")
return nil
},