Merge branch 'master' into ocis-1132
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
|
||||
Image is based on [owncloud/eos-base](https://hub.docker.com/r/owncloud/eos-base) from [eos-stack](https://github.com/owncloud-docker/eos-stack)
|
||||
|
||||
{{< hint info >}}
|
||||
On MacOS do not mount a local folder to the `/var/tmp/reva/` path. The fuse driver used by docker [does not support extended attributes](https://docs.docker.com/v18.09/docker-for-mac/osxfs/). See [#182](https://github.com/owncloud/ocis/issues/182) for more details.
|
||||
{{< /hint >}}
|
||||
|
||||
## Build
|
||||
```shell
|
||||
docker build -t owncloud/eos-ocis-dev:latest .
|
||||
|
||||
@@ -24,6 +24,7 @@ require (
|
||||
github.com/owncloud/ocis/ocis-phoenix v0.0.0-00010101000000-000000000000
|
||||
github.com/owncloud/ocis/ocis-pkg v0.1.0
|
||||
github.com/owncloud/ocis/ocs v0.0.0-00010101000000-000000000000
|
||||
github.com/owncloud/ocis/onlyoffice v0.0.0-00010101000000-000000000000
|
||||
github.com/owncloud/ocis/proxy v0.0.0-00010101000000-000000000000
|
||||
github.com/owncloud/ocis/settings v0.0.0-20200918114005-1a0ddd2190ee
|
||||
github.com/owncloud/ocis/storage v0.0.0-20201015120921-38358ba4d4df
|
||||
@@ -45,6 +46,7 @@ replace (
|
||||
github.com/owncloud/ocis/ocis-phoenix => ../ocis-phoenix
|
||||
github.com/owncloud/ocis/ocis-pkg => ../ocis-pkg
|
||||
github.com/owncloud/ocis/ocs => ../ocs
|
||||
github.com/owncloud/ocis/onlyoffice => ../onlyoffice
|
||||
github.com/owncloud/ocis/proxy => ../proxy
|
||||
github.com/owncloud/ocis/settings => ../settings
|
||||
github.com/owncloud/ocis/storage => ../storage
|
||||
|
||||
@@ -422,6 +422,7 @@ github.com/go-asn1-ber/asn1-ber v1.5.1 h1:pDbRAunXzIUXfx4CB2QJFv5IuPiuoW+sWvr/Us
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
|
||||
github.com/go-bindata/go-bindata v3.1.1+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo=
|
||||
github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ=
|
||||
github.com/go-chi/chi v4.1.0+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ=
|
||||
github.com/go-chi/chi v4.1.2+incompatible h1:fGFk2Gmi/YKXk0OmGfBh0WgmN3XB8lVnEyNz34tQRec=
|
||||
github.com/go-chi/chi v4.1.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ=
|
||||
github.com/go-chi/render v1.0.1 h1:4/5tis2cKaNdnv9zFLfXzcquC9HbeZgCnxGnKrltBS8=
|
||||
@@ -1203,6 +1204,8 @@ github.com/owncloud/ocis-hello v0.1.0-alpha1.0.20200828085053-37fcf3c8f853 h1:ei
|
||||
github.com/owncloud/ocis-hello v0.1.0-alpha1.0.20200828085053-37fcf3c8f853/go.mod h1:vnpYlDkhVoiuUAuTnY4Ajz2d5Alz0c/49AxptOLTpYA=
|
||||
github.com/owncloud/ocis-pkg v1.3.0/go.mod h1:Wo0QfOmhadh2vNcUoQIsw2yaOT3zeftk+xaOOwP3y88=
|
||||
github.com/owncloud/ocis-pkg/v2 v2.0.1/go.mod h1:7bVnn3VUaqdmvpMkXF0QVEF1fRugs35hSkuVTAq9yjk=
|
||||
github.com/owncloud/ocis-pkg/v2 v2.2.0/go.mod h1:MXv7QzsYsu4YWuyJxhq1kLLmJa/r5gbqHe1FXulMHaw=
|
||||
github.com/owncloud/ocis-pkg/v2 v2.4.0 h1:/3ZOd4txtwjiNKJA9iLT9BjrJw5YgHSX13fQR4BYfGY=
|
||||
github.com/owncloud/ocis-pkg/v2 v2.4.0/go.mod h1:FSzIvhx9HcZcq4jgNaDowNvM7PTX/XCyoMvyfzidUpE=
|
||||
github.com/owncloud/ocis-settings v0.3.2-0.20200827193534-8caf098e6537/go.mod h1:vRge9QDkOsc6j76gPBmZs1Z5uOPrV4DIkZCgZCEFwBA=
|
||||
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw=
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/owncloud/ocis/onlyoffice/pkg/command"
|
||||
"github.com/owncloud/ocis/onlyoffice/pkg/flagset"
|
||||
)
|
||||
|
||||
// OnlyofficeCommand is the entrypoint for the onlyoffice command.
|
||||
func OnlyofficeCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "onlyoffice",
|
||||
Usage: "Start onlyoffice server",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.ServerWithConfig(cfg.Onlyoffice),
|
||||
Before: func(c *cli.Context) error {
|
||||
if cfg.HTTP.Root != "/" {
|
||||
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
onlyofficeCommand := command.Server(configureOnlyoffice(cfg).Onlyoffice)
|
||||
|
||||
if err := onlyofficeCommand.Before(c); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return cli.HandleAction(onlyofficeCommand.Action, c)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func configureOnlyoffice(cfg *config.Config) *config.Config {
|
||||
cfg.Onlyoffice.Log.Level = cfg.Log.Level
|
||||
cfg.Onlyoffice.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Onlyoffice.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Onlyoffice.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Onlyoffice.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Onlyoffice.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Onlyoffice.Tracing.Collector = cfg.Tracing.Collector
|
||||
}
|
||||
|
||||
return cfg
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(OnlyofficeCommand)
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
konnectd "github.com/owncloud/ocis/konnectd/pkg/config"
|
||||
phoenix "github.com/owncloud/ocis/ocis-phoenix/pkg/config"
|
||||
ocs "github.com/owncloud/ocis/ocs/pkg/config"
|
||||
onlyoffice "github.com/owncloud/ocis/onlyoffice/pkg/config"
|
||||
proxy "github.com/owncloud/ocis/proxy/pkg/config"
|
||||
settings "github.com/owncloud/ocis/settings/pkg/config"
|
||||
storage "github.com/owncloud/ocis/storage/pkg/config"
|
||||
@@ -70,19 +71,20 @@ type Config struct {
|
||||
TokenManager TokenManager
|
||||
|
||||
Accounts *accounts.Config
|
||||
GLAuth *glauth.Config
|
||||
Graph *graph.Config
|
||||
GraphExplorer *graphExplorer.Config
|
||||
GLAuth *glauth.Config
|
||||
Hello *hello.Config
|
||||
Konnectd *konnectd.Config
|
||||
OCS *ocs.Config
|
||||
Onlyoffice *onlyoffice.Config
|
||||
Phoenix *phoenix.Config
|
||||
Proxy *proxy.Config
|
||||
Settings *settings.Config
|
||||
Storage *storage.Config
|
||||
Store *store.Config
|
||||
Thumbnails *thumbnails.Config
|
||||
WebDAV *webdav.Config
|
||||
Settings *settings.Config
|
||||
Store *store.Config
|
||||
Runtime *pman.Config
|
||||
}
|
||||
|
||||
@@ -90,19 +92,20 @@ type Config struct {
|
||||
func New() *Config {
|
||||
return &Config{
|
||||
Accounts: accounts.New(),
|
||||
GLAuth: glauth.New(),
|
||||
Graph: graph.New(),
|
||||
GraphExplorer: graphExplorer.New(),
|
||||
Hello: hello.New(),
|
||||
Konnectd: konnectd.New(),
|
||||
OCS: ocs.New(),
|
||||
Onlyoffice: onlyoffice.New(),
|
||||
Phoenix: phoenix.New(),
|
||||
WebDAV: webdav.New(),
|
||||
Storage: storage.New(),
|
||||
GLAuth: glauth.New(),
|
||||
Proxy: proxy.New(),
|
||||
Thumbnails: thumbnails.New(),
|
||||
Settings: settings.New(),
|
||||
Storage: storage.New(),
|
||||
Store: store.New(),
|
||||
Thumbnails: thumbnails.New(),
|
||||
WebDAV: webdav.New(),
|
||||
Runtime: pman.NewConfig(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,14 +33,16 @@ var (
|
||||
|
||||
// Extensions are ocis extension services
|
||||
Extensions = []string{
|
||||
"proxy",
|
||||
"store",
|
||||
"settings",
|
||||
"phoenix",
|
||||
"glauth",
|
||||
"graph",
|
||||
"graph-explorer",
|
||||
"konnectd",
|
||||
"ocs",
|
||||
"webdav",
|
||||
"onlyoffice",
|
||||
"phoenix",
|
||||
"proxy",
|
||||
"settings",
|
||||
"store",
|
||||
"storage-frontend",
|
||||
"storage-gateway",
|
||||
"storage-userprovider",
|
||||
@@ -50,9 +52,8 @@ var (
|
||||
"storage-users",
|
||||
"storage-metadata",
|
||||
"storage-public-link",
|
||||
"glauth",
|
||||
"konnectd",
|
||||
"thumbnails",
|
||||
"webdav",
|
||||
}
|
||||
|
||||
// There seem to be a race condition when reva-sharing needs to read the sharing.json file and the parent folder is not present.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "Configuration"
|
||||
date: "{{ date "2006-01-02T15:04:05-0700" now }}"
|
||||
weight: 20
|
||||
weight: 2
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/ocis/templates
|
||||
geekdocFilePath: CONFIGURATION.tmpl
|
||||
@@ -25,7 +25,7 @@ geekdocFilePath: CONFIGURATION.tmpl
|
||||
|
||||
oCIS Single Binary is not responsible for configuring extensions. Instead, each extension could either be configured by environment variables, cli flags or config files.
|
||||
|
||||
Each extension has its dedicated documentation page (e.g. https://owncloud.github.io/extensions/proxy/configuration/) which lists all possible configurations. Config files and environment variables are picked up if you use the `./bin/ocis server` command within the oCIS single binary. Command line flags must be set explicitly on the extensions subcommands.
|
||||
Each extension has its dedicated documentation page (e.g. [proxy configuration]({{"{{"}}< relref "../extensions/accounts/configuration.md" >{{"}}"}})) which lists all possible configurations. Config files and environment variables are picked up if you use the `./bin/ocis server` command within the oCIS single binary. Command line flags must be set explicitly on the extensions subcommands.
|
||||
|
||||
### Configuration using config files
|
||||
|
||||
|
||||
Reference in New Issue
Block a user