mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-01 01:41:21 -05:00
116 lines
3.8 KiB
Cheetah
116 lines
3.8 KiB
Cheetah
---
|
|
title: "Configuration"
|
|
date: "{{ date "2006-01-02T15:04:05-0700" now }}"
|
|
weight: 20
|
|
geekdocRepo: https://github.com/owncloud/ocis
|
|
geekdocEditPath: edit/master/storage/templates
|
|
geekdocFilePath: CONFIGURATION.tmpl
|
|
---
|
|
{{- define "options"}}
|
|
{{ $fnName := (last . ).Flags -}}
|
|
{{ range $opt := first . }}{{ with list $fnName $opt -}}
|
|
{{ $o := last . -}}
|
|
{{ if eq $o.FnName $fnName -}}
|
|
--{{ $o.Name }} | ${{ index $o.Env 0 }}
|
|
: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }}
|
|
|
|
{{ end -}}
|
|
{{ end -}}
|
|
{{ end -}}
|
|
{{ end }}
|
|
{{- define "option"}}
|
|
{{- $options := first . }}
|
|
{{- $oName := last . }}
|
|
{{- range $o := $options }}{{ with (list $o $oName) -}}
|
|
{{- $o := first . }}
|
|
{{- if eq $o.FnName (last .) -}}
|
|
--{{ $o.Name }} | ${{ index $o.Env 0 }}
|
|
: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }}
|
|
|
|
{{ end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{ end }}
|
|
|
|
{{`{{< toc >}}`}}
|
|
|
|
## Configuration
|
|
|
|
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.
|
|
|
|
### Configuration using config files
|
|
|
|
Out of the box extensions will attempt to read configuration details from:
|
|
|
|
```console
|
|
/etc/ocis
|
|
$HOME/.ocis
|
|
./config
|
|
```
|
|
|
|
For this configuration to be picked up, have a look at your extension `root` command and look for which default config name it has assigned. *i.e: ocis-proxy reads `proxy.json | yaml | toml ...`*.
|
|
|
|
So far we support the file formats `JSON` and `YAML`, if you want to get a full example configuration just take a look at [our repository](https://github.com/owncloud/ocis/tree/master/config), there you can always see the latest configuration format. These example configurations include all available options and the default values. The configuration file will be automatically loaded if it's placed at `/etc/ocis/ocis.yml`, `${HOME}/.ocis/ocis.yml` or `$(pwd)/config/ocis.yml`.
|
|
|
|
### Environment variables
|
|
|
|
If you prefer to configure the service with environment variables you can see the available variables below.
|
|
|
|
### Commandline flags
|
|
|
|
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
|
|
|
|
{{ $options := .Options -}}
|
|
{{ range $com := .Commands }}{{ with (list $options $com) -}}
|
|
{{ $c := last . -}}
|
|
{{ if eq $c.Name "storage" -}}
|
|
## Root Command
|
|
|
|
{{ $c.Usage }}
|
|
|
|
Usage: `storage [global options] command [command options] [arguments...]`
|
|
{{ template "options" . -}}
|
|
## Sub Commands
|
|
|
|
{{ end -}}
|
|
{{ end -}}
|
|
{{ end -}}
|
|
{{- range $com := .Commands }}{{ with (list $options $com) -}}
|
|
{{- $c := last . }}
|
|
{{- if ne $c.Name "ocis-reva" -}}
|
|
### storage {{ $c.Name }}
|
|
|
|
{{ $c.Usage }}
|
|
|
|
Usage: `storage {{ $c.Name }} [command options] [arguments...]`
|
|
{{ template "options" . }}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
## Config for the different Storage Drivers
|
|
|
|
You can set different storage drivers for the Storage Providers. Please check the storage provider configuration.
|
|
|
|
Example: Set the home and users Storage Provider to `ocis`
|
|
|
|
`STORAGE_HOME_DRIVER=ocis`
|
|
`STORAGE_USERS_DRIVER=ocis`
|
|
|
|
### Local Driver
|
|
|
|
{{ template "option" (list .Options "DriverLocalWithConfig") -}}
|
|
|
|
### Eos Driver
|
|
|
|
{{ template "option" (list .Options "DriverEOSWithConfig") -}}
|
|
|
|
### owCloud Driver
|
|
|
|
{{ template "option" (list .Options "DriverOwnCloudWithConfig") -}}
|
|
|
|
### Ocis Driver
|
|
|
|
{{ template "option" (list .Options "DriverOCISWithConfig") -}}
|