configure phoenix apps
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -3,7 +3,6 @@ package command
|
||||
import (
|
||||
"github.com/micro/cli"
|
||||
"github.com/owncloud/ocis-phoenix/pkg/command"
|
||||
svcconfig "github.com/owncloud/ocis-phoenix/pkg/config"
|
||||
"github.com/owncloud/ocis-phoenix/pkg/flagset"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
@@ -27,17 +26,6 @@ func PhoenixCommand(cfg *config.Config) cli.Command {
|
||||
}
|
||||
}
|
||||
|
||||
func configurePhoenix(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Phoenix.Log.Level = cfg.Log.Level
|
||||
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)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
svcconfig "github.com/owncloud/ocis-phoenix/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
)
|
||||
|
||||
func configurePhoenix(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Phoenix.Log.Level = cfg.Log.Level
|
||||
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 = "/"
|
||||
cfg.Phoenix.Phoenix.Config.Apps = []string{
|
||||
"draw-io",
|
||||
"files",
|
||||
"markdown-viewer",
|
||||
"media-viewer",
|
||||
"pdf-viewer",
|
||||
}
|
||||
|
||||
return cfg.Phoenix
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
// +build simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
svcconfig "github.com/owncloud/ocis-phoenix/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
)
|
||||
|
||||
func configurePhoenix(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Phoenix.Log.Level = cfg.Log.Level
|
||||
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 = "/"
|
||||
// disable built in apps
|
||||
cfg.Phoenix.Phoenix.Config.Apps = []string{}
|
||||
// enable ocis-hello extension
|
||||
cfg.Phoenix.Phoenix.Config.ExternalApps = []svcconfig.ExternalApp{
|
||||
svcconfig.ExternalApp{
|
||||
Name: "hello",
|
||||
Path: "http://localhost:9105/hello.js",
|
||||
Config: map[string]interface{}{
|
||||
"url": "http://localhost:9105",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return cfg.Phoenix
|
||||
}
|
||||
Reference in New Issue
Block a user