mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 12:19:37 -06:00
Make all paths configurable and default to
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -10,7 +10,7 @@ func DriverLocalWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "storage-local-root",
|
||||
Value: "/var/tmp/ocis/local",
|
||||
Value: "/var/tmp/ocis/storage/local",
|
||||
Usage: "the path to the local storage root",
|
||||
EnvVars: []string{"STORAGE_DRIVER_LOCAL_ROOT"},
|
||||
Destination: &cfg.Reva.Storages.Local.Root,
|
||||
|
||||
@@ -10,14 +10,14 @@ func DriverOwnCloudWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "storage-owncloud-datadir",
|
||||
Value: "/var/tmp/ocis/owncloud",
|
||||
Value: "/var/tmp/ocis/storage/owncloud",
|
||||
Usage: "the path to the owncloud data directory",
|
||||
EnvVars: []string{"STORAGE_DRIVER_OWNCLOUD_DATADIR"},
|
||||
Destination: &cfg.Reva.Storages.OwnCloud.Root,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-owncloud-uploadinfo-dir",
|
||||
Value: "/var/tmp/ocis/uploadinfo",
|
||||
Value: "/var/tmp/ocis/storage/uploadinfo",
|
||||
Usage: "the path to the tus upload info directory",
|
||||
EnvVars: []string{"STORAGE_DRIVER_OWNCLOUD_UPLOADINFO_DIR"},
|
||||
Destination: &cfg.Reva.Storages.OwnCloud.UploadInfoDir,
|
||||
|
||||
@@ -30,11 +30,18 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
|
||||
|
||||
// OCDav
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "chunk-folder",
|
||||
Value: "/var/tmp/ocis/tmp/chunks",
|
||||
Usage: "temp directory for chunked uploads",
|
||||
EnvVars: []string{"STORAGE_CHUNK_FOLDER"},
|
||||
Destination: &cfg.Reva.OCDav.WebdavNamespace,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "webdav-namespace",
|
||||
Value: "/home/",
|
||||
Usage: "Namespace prefix for the /webdav endpoint",
|
||||
EnvVars: []string{"WEBDAV_NAMESPACE"},
|
||||
EnvVars: []string{"STORAGE_WEBDAV_NAMESPACE"},
|
||||
Destination: &cfg.Reva.OCDav.WebdavNamespace,
|
||||
},
|
||||
|
||||
@@ -44,7 +51,7 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Name: "dav-files-namespace",
|
||||
Value: "/users/",
|
||||
Usage: "Namespace prefix for the webdav /dav/files endpoint",
|
||||
EnvVars: []string{"DAV_FILES_NAMESPACE"},
|
||||
EnvVars: []string{"STORAGE_DAV_FILES_NAMESPACE"},
|
||||
Destination: &cfg.Reva.OCDav.DavFilesNamespace,
|
||||
},
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ func SharingWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "user-json-file",
|
||||
Value: "/var/tmp/ocis/shares.json",
|
||||
Value: "/var/tmp/ocis/storage/shares.json",
|
||||
Usage: "file used to persist shares for the UserShareProvider",
|
||||
EnvVars: []string{"STORAGE_SHARING_USER_JSON_FILE"},
|
||||
Destination: &cfg.Reva.Sharing.UserJSONFile,
|
||||
@@ -63,6 +63,13 @@ func SharingWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"STORAGE_SHARING_PUBLIC_DRIVER"},
|
||||
Destination: &cfg.Reva.Sharing.PublicDriver,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "public-json-file",
|
||||
Value: "/var/tmp/ocis/storage/publicshares.json",
|
||||
Usage: "file used to persist shares for the PublicShareProvider",
|
||||
EnvVars: []string{"STORAGE_SHARING_PUBLIC_JSON_FILE"},
|
||||
Destination: &cfg.Reva.Sharing.PublicJSONFile,
|
||||
},
|
||||
}
|
||||
|
||||
flags = append(flags, TracingWithConfig(cfg)...)
|
||||
|
||||
@@ -111,6 +111,13 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"STORAGE_HOME_HTTP_PREFIX"},
|
||||
Destination: &cfg.Reva.StorageHome.HTTPPrefix,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tmp-folder",
|
||||
Value: "/var/tmp/ocis/tmp/home",
|
||||
Usage: "path to tmp folder",
|
||||
EnvVars: []string{"STORAGE_HOME_TMP_FOLDER"},
|
||||
Destination: &cfg.Reva.StorageHome.TempFolder,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "enable-home",
|
||||
Value: true,
|
||||
|
||||
@@ -50,6 +50,13 @@ func StorageMetadata(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"STORAGE_METADATA_HTTP_ADDR"},
|
||||
Destination: &cfg.Reva.StorageMetadata.HTTPAddr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tmp-folder",
|
||||
Value: "/var/tmp/ocis/tmp/metadata",
|
||||
Usage: "path to tmp folder",
|
||||
EnvVars: []string{"STORAGE_METADATA_TMP_FOLDER"},
|
||||
Destination: &cfg.Reva.StorageMetadata.TempFolder,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "driver",
|
||||
Value: "ocis",
|
||||
@@ -91,7 +98,7 @@ func StorageMetadata(cfg *config.Config) []cli.Flag {
|
||||
flags = append(flags,
|
||||
&cli.StringFlag{
|
||||
Name: "storage-root",
|
||||
Value: "/var/tmp/ocis/metadata",
|
||||
Value: "/var/tmp/ocis/storage/metadata",
|
||||
Usage: "the path to the metadata storage root",
|
||||
EnvVars: []string{"STORAGE_METADATA_ROOT"},
|
||||
Destination: &cfg.Reva.Storages.Common.Root,
|
||||
|
||||
@@ -108,6 +108,13 @@ func StorageUsersWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"STORAGE_USERS_HTTP_PREFIX"},
|
||||
Destination: &cfg.Reva.StorageUsers.HTTPPrefix,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tmp-folder",
|
||||
Value: "/var/tmp/ocis/tmp/users",
|
||||
Usage: "path to tmp folder",
|
||||
EnvVars: []string{"STORAGE_USERS_TMP_FOLDER"},
|
||||
Destination: &cfg.Reva.StorageUsers.TempFolder,
|
||||
},
|
||||
|
||||
// some drivers need to look up users at the gateway
|
||||
|
||||
|
||||
Reference in New Issue
Block a user