add generate docs steps and update webdav docs

This commit is contained in:
Michael Barz
2020-09-30 22:57:03 +02:00
parent 456ba52d05
commit e53e57eb3f
21 changed files with 340 additions and 609 deletions

View File

@@ -987,6 +987,11 @@ def badges(ctx):
}
def docs(ctx):
generateConfigDocs = []
for module in config['modules']:
generateConfigDocs += ['cd /drone/src/%s' % (module), 'make config-docs-generate']
return {
'kind': 'pipeline',
'type': 'docker',
@@ -1003,6 +1008,17 @@ def docs(ctx):
'make docs-copy'
],
},
{
'name': 'generate-config-docs',
'image': 'webhippie/golang:1.13',
'commands': generateConfigDocs,
'volumes': [
{
'name': 'gopath',
'path': '/srv/app',
},
],
},
{
'name': 'test',
'image': 'owncloudci/hugo:0.71.0',
@@ -1064,6 +1080,12 @@ def docs(ctx):
'depends_on': [
'badges',
],
'volumes': [
{
'name': 'gopath',
'temp': {},
},
],
'trigger': {
'ref': [
'refs/heads/master',

View File

@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2020-09-30T17:30:16+0200"
date: "2020-09-21T13:14:47+0200"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis-konnectd
geekdocEditPath: edit/master/docs
@@ -108,9 +108,6 @@ Usage: `ocis-konnectd server [command options] [arguments...]`
--http-namespace | $KONNECTD_HTTP_NAMESPACE
: Set the base namespace for service discovery. Default: `com.owncloud.web`.
--name | $KONNECTD_NAME
: Service name. Default: `konnectd`.
--identity-manager | $KONNECTD_IDENTITY_MANAGER
: Identity manager (one of ldap,kc,cookie,dummy). Default: `ldap`.
@@ -177,15 +174,3 @@ Usage: `ocis-konnectd server [command options] [arguments...]`
--disable-identifier-webapp | $KONNECTD_DISABLE_IDENTIFIER_WEBAPP
: Disable built-in identifier-webapp to use a frontend hosted elsewhere.. Default: `true`.
### ocis-konnectd version
Print the versions of the running instances
Usage: `ocis-konnectd version [command options] [arguments...]`
--http-namespace | $KONNECTD_HTTP_NAMESPACE
: Set the base namespace for service discovery. Default: `com.owncloud.web`.
--name | $KONNECTD_NAME
: Service name. Default: `konnectd`.

View File

@@ -0,0 +1,10 @@
---
title: WebDaV
date: 2018-05-02T00:00:00+00:00
weight: 10
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/extensions/webdav
geekdocFilePath: _index.md
---
This service provides the WebDAV API which is required by some ownCloud clients.

View File

@@ -1,10 +1,14 @@
---
title: "Building"
date: 2018-05-02T00:00:00+00:00
anchor: "building"
weight: 30
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/extensions/webdav
geekdocFilePath: building.md
---
{{< toc >}}
As this project is built with Go, so you need to install that first. The installation of Go is out of the scope of this document, please follow the official documentation for [Go](https://golang.org/doc/install), to build this project you have to install Go >= v1.12. After the installation of the required tools you need to get the sources:
{{< highlight txt >}}

View File

@@ -0,0 +1,125 @@
---
title: "Configuration"
date: "2020-09-30T22:51:03+0200"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/extensions/webdav
geekdocFilePath: configuration.md
---
{{< 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/ocis_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`.
### Envrionment 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.
## Root Command
Serve WebDAV API for oCIS
Usage: `webdav [global options] command [command options] [arguments...]`
--config-file | $WEBDAV_CONFIG_FILE
: Path to config file.
--log-level | $WEBDAV_LOG_LEVEL
: Set logging level. Default: `info`.
--log-pretty | $WEBDAV_LOG_PRETTY
: Enable pretty logging. Default: `true`.
--log-color | $WEBDAV_LOG_COLOR
: Enable colored logging. Default: `true`.
## Sub Commands
### webdav health
Check health status
Usage: `webdav health [command options] [arguments...]`
--debug-addr | $WEBDAV_DEBUG_ADDR
: Address to debug endpoint. Default: `0.0.0.0:9119`.
### webdav server
Start integrated server
Usage: `webdav server [command options] [arguments...]`
--tracing-enabled | $WEBDAV_TRACING_ENABLED
: Enable sending traces.
--tracing-type | $WEBDAV_TRACING_TYPE
: Tracing backend type. Default: `jaeger`.
--tracing-endpoint | $WEBDAV_TRACING_ENDPOINT
: Endpoint for the agent.
--tracing-collector | $WEBDAV_TRACING_COLLECTOR
: Endpoint for the collector.
--tracing-service | $WEBDAV_TRACING_SERVICE
: Service name for tracing. Default: `webdav`.
--debug-addr | $WEBDAV_DEBUG_ADDR
: Address to bind debug server. Default: `0.0.0.0:9119`.
--debug-token | $WEBDAV_DEBUG_TOKEN
: Token to grant metrics access.
--debug-pprof | $WEBDAV_DEBUG_PPROF
: Enable pprof debugging.
--debug-zpages | $WEBDAV_DEBUG_ZPAGES
: Enable zpages debugging.
--http-addr | $WEBDAV_HTTP_ADDR
: Address to bind http server. Default: `0.0.0.0:9115`.
--http-namespace | $WEBDAV_HTTP_NAMESPACE
: Set the base namespace for service discovery. Default: `com.owncloud.web`.
--service-name | $WEBDAV_SERVICE_NAME
: Service name. Default: `webdav`.
--http-root | $WEBDAV_HTTP_ROOT
: Root path of http server. Default: `/`.
### webdav version
Print the versions of the running instances
Usage: `webdav version [command options] [arguments...]`
--http-namespace | $WEBDAV_HTTP_NAMESPACE
: Set the base namespace for service discovery. Default: `com.owncloud.web`.
--service-name | $WEBDAV_SERVICE_NAME
: Service name. Default: `webdav`.

View File

@@ -1,10 +1,14 @@
---
title: "Getting Started"
date: 2018-05-02T00:00:00+00:00
anchor: "getting-started"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/extensions/webdav
geekdocFilePath: getting-started.md
---
{{< toc >}}
### Installation
So far we are offering two different variants for the installation. You can choose between [Docker](https://www.docker.com/) or pre-built binaries which are stored on our download mirrors and GitHub releases. Maybe we will also provide system packages for the major distributions later if we see the need for it.

View File

@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2020-09-30T17:35:29+0200"
date: "2020-09-21T13:14:56+0200"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs
@@ -57,6 +57,15 @@ Usage: `ocis [global options] command [command options] [arguments...]`
## Sub Commands
### ocis health
Check health status
Usage: `ocis health [command options] [arguments...]`
--debug-addr | $OCIS_DEBUG_ADDR
: Address to debug endpoint. Default: `0.0.0.0:9010`.
### ocis server
Start fullstack server
@@ -99,114 +108,69 @@ Usage: `ocis server [command options] [arguments...]`
--grpc-addr | $OCIS_GRPC_ADDR
: Address to bind grpc server. Default: `0.0.0.0:9001`.
### ocis health
Check health status
Usage: `ocis health [command options] [arguments...]`
--debug-addr | $OCIS_DEBUG_ADDR
: Address to debug endpoint. Default: `0.0.0.0:9010`.
### List of available Extension subcommands
There are more subcommands to start the individual extensions. Please check the documentation about their usage and options in the dedicated section of the documentation.
#### ocis list
Lists running ocis extensions
#### ocis phoenix
Start phoenix server
#### ocis reva-gateway
Start reva gateway
#### ocis reva-storage-public-link
Start reva public link storage
#### ocis kill
Kill an extension by name
#### ocis ocs
Start ocs server
#### ocis reva-frontend
Start reva frontend
#### ocis reva-storage-eos-data
Start reva storage data provider for eos mount
#### ocis glauth
Start glauth server
#### ocis reva-storage-eos
Start reva storage service for eos mount
#### ocis reva-users
Start reva users service
#### ocis konnectd
Start konnectd server
#### ocis reva-storage-home-data
Start reva storage data provider for home mount
#### ocis reva-storage-root
Start reva root storage
#### ocis run
Runs an extension
#### ocis settings
Start settings server
#### ocis thumbnails
Start thumbnails server
#### ocis webdav
Start webdav server
#### ocis reva-auth-basic
Start reva auth-basic service
#### ocis accounts
Start accounts server
#### ocis proxy
Start proxy server
#### ocis store
Start a go-micro store
#### ocis glauth
Start glauth server
#### ocis ocs
Start ocs server
#### ocis reva-storage-eos-data
Start reva storage data provider for eos mount
#### ocis reva-storage-home-data
Start reva storage data provider for home mount
#### ocis kill
Kill an extension by name
#### ocis proxy
Start proxy server
#### ocis reva-auth-bearer
Start reva auth-bearer service
#### ocis reva-sharing
#### ocis reva-storage-oc-data
Start reva sharing service
Start reva storage data provider for oc mount
#### ocis settings
Start settings server
#### ocis accounts
Start accounts server
#### ocis phoenix
Start phoenix server
#### ocis reva-storage-eos
Start reva storage service for eos mount
#### ocis reva-storage-home
@@ -216,7 +180,43 @@ Start reva storage service for home mount
Start reva storage service for oc mount
#### ocis reva-storage-oc-data
#### ocis reva-storage-root
Start reva storage data provider for oc mount
Start reva root storage
#### ocis reva-gateway
Start reva gateway
#### ocis reva-sharing
Start reva sharing service
#### ocis reva-users
Start reva users service
#### ocis list
Lists running ocis extensions
#### ocis reva-auth-basic
Start reva auth-basic service
#### ocis reva-frontend
Start reva frontend
#### ocis reva-storage-public-link
Start reva public link storage
#### ocis thumbnails
Start thumbnails server
#### ocis webdav
Start webdav server

View File

@@ -130,9 +130,9 @@ release-check:
.PHONY: release-finish
release-finish: release-copy release-check
.PHONY: docs
docs:
cd docs; hugo
.PHONY: config-docs-generate
config-docs-generate:
go run github.com/owncloud/flaex >| ../docs/extensions/$(NAME)/configuration.md
.PHONY: watch
watch:

View File

@@ -1 +0,0 @@
public/

View File

@@ -1,6 +0,0 @@
---
title: "{{ replace .TranslationBaseName "-" " " | title }}"
date: {{ .Date }}
anchor: "{{ replace .TranslationBaseName "-" " " | title | urlize }}"
weight:
---

View File

@@ -1,18 +0,0 @@
baseURL = "https://owncloud.github.io/ocis-webdav/"
languageCode = "en-us"
title = "ownCloud Infinite Scale: WebDAV"
pygmentsUseClasses = true
disableKinds = ["taxonomy", "taxonomyTerm", "RSS", "sitemap"]
[blackfriday]
angledQuotes = true
fractions = false
plainIDAnchors = true
smartlists = true
extensions = ["hardLineBreak"]
[params]
author = "ownCloud GmbH"
description = "Serve WebDAV API for oCIS"
keywords = "reva, ocis"

View File

@@ -1,8 +0,0 @@
---
title: "About"
date: 2018-05-02T00:00:00+00:00
anchor: "about"
weight: 10
---
This service provides the WebDAV API which is required by some ownCloud clients.

View File

@@ -1,8 +0,0 @@
---
title: "License"
date: 2018-05-02T00:00:00+00:00
anchor: "license"
weight: 40
---
This project is licensed under the [Apache 2.0](https://github.com/owncloud/ocis/webdav/blob/master/LICENSE) license. For the license of the used libraries you have to check the respective sources.

View File

@@ -1,57 +0,0 @@
<!DOCTYPE html>
<html id="html" lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta name="viewport" content="width=device-width"/>
<title>
{{ .Site.Title }}
</title>
<meta name="description" content="{{ with .Site.Params.description }}{{ . }}{{ end }}">
<meta name="author" content="{{ with .Site.Params.author }}{{ . }}{{ end }}">
{{ partial "style.html" . }}
</head>
<body>
<section id="Menu">
<header>
<h1>
{{ .Site.Title }}
</h1>
<p>
{{ .Site.Params.description }}
</p>
</header>
<nav>
{{ range .Data.Pages.ByWeight }}
<a href="#{{ .Params.anchor }}">
{{ .Title }}
</a>
{{ end }}
</nav>
</section>
{{ range .Data.Pages.ByWeight }}
<section id="{{ .Params.anchor }}">
<h2>
<a href="#{{ .Params.anchor }}">
{{ .Title }}
</a>
<small>
<a href="#html">
Back to Top
</a>
</small>
</h2>
{{ .Content | markdownify }}
</section>
{{ end }}
</body>
</html>

View File

@@ -1,2 +0,0 @@
<link rel="stylesheet" href="syntax.css" />
<link rel="stylesheet" href="styles.css" />

View File

@@ -1,338 +0,0 @@
body,
html {
cursor: default;
}
body,
div,
dl,
dt,
dd,
ul,
ol,
li,
h1,
h2,
h3,
h4,
h5,
h6,
pre,
form,
fieldset,
input,
textarea,
p,
blockquote,
th,
td {
margin: 0;
padding: 0;
}
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
:before,
:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
img,
object,
embed {
max-width: 100%;
height: auto;
}
object,
embed {
height: 100%;
}
img {
margin: 1.25% 0;
-ms-interpolation-mode: bicubic;
}
html {
background-color: #F0F1F3;
padding: 2%;
}
body {
font-size: 16px;
line-height: 1.6;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
color: #242424;
max-width: 800px;
margin: 5% auto;
}
body::after {
clear: both;
content: "";
display: table;
}
header {
margin-bottom: 8%;
}
footer {
text-align: center;
}
h1,
h2,
h3,
h4,
h5,
h2 a {
color: #263A48;
font-weight: 500;
text-decoration: none;
}
h1,
h2 {
font-size: 36px;
padding-bottom: 0.3em;
margin-bottom: 0.4em;
border-bottom: 1px solid #eee
}
h2 {
font-size: 22px;
padding-bottom: 0.6em;
margin-bottom: 0.6em;
margin-top: 2.5em;
}
h3 {
font-size: 18px;
margin-bottom: 0.3em;
}
h2 small a {
color: #98999C;
font-size: 15px;
font-weight: normal;
float: right;
position: absolute;
top: 15px;
right: 20px;
}
section {
background: #fff;
margin-bottom: 1%;
position: relative;
padding: 6% 8%;
}
blockquote {
border-left: 3px solid #d54e21;
font-size: 16px;
padding: 0 0 0 20px;
color: #d54e21;
}
blockquote a {
color: #d54e21;
font-weight: 500;
}
blockquote code {
color: #d54e21;
}
.highlight pre {
padding: 10px;
}
.highlight {
margin-bottom: 4%;
}
a {
color: #1e8cbe;
text-decoration: underline;
}
a:hover {
color: #d54e21;
}
ul {
list-style: none;
}
ol {
list-style: number;
}
ol li {
color: #98999C;
margin-bottom: 5px;
}
ol li:last-child {
margin-bottom: 0;
}
p,
ul,
ol,
blockquote {
margin-bottom: 4%;
}
ul ul {
padding-top: 0;
margin-bottom: 0;
margin-left: 4%;
}
ul ul li:before {
content: '-';
display: inline-block;
padding-right: 2%;
}
ul.col-2 {
color: #98999C;
-webkit-column-count: 2;
-moz-column-count: 2;
column-count: 2;
-webkit-column-gap: 20px;
-moz-column-gap: 20px;
column-gap: 20px;
}
dl dt {
font-weight: bold;
}
dl dd {
padding-left: 10px;
}
@media screen and (min-width: 500px) {
ul.col-2 {
-webkit-column-count: 3;
-moz-column-count: 3;
column-count: 3;
-webkit-column-gap: 20px;
-moz-column-gap: 20px;
column-gap: 20px;
}
}
nav {
background: #F0F1F3;
min-width: 215px;
margin-bottom: 5px;
margin-top: 15px;
}
nav:first-of-type a {
color: #d54e21;
border-radius: 0;
}
nav:first-of-type a:hover {
color: #d54e21;
}
nav:first-of-type a:before {
background-color: #d54e21;
}
nav.affix {
position: fixed;
top: 20px;
}
nav.affix-bottom {
position: absolute;
}
nav a {
border-radius: 3px;
font-size: 15px;
display: block;
cursor: pointer;
font-weight: 500;
position: relative;
text-decoration: none;
padding: 10px 12px;
width: 100%;
padding-right: 3px;
border-bottom: 2px solid #fff;
}
nav a:before {
content: '';
width: 4px;
display: block;
left: 0;
position: absolute;
height: 100%;
display: none;
background: #1e8cbe;
top: 0;
}
nav a:hover {
background-color: #E6E8EA;
color: #1e8cbe;
text-decoration: underline;
}
nav a:hover:before {
display: block;
}
nav a:last-of-type {
border-bottom: none;
}
.gist {
margin-top: 5.1%;
margin-bottom: 5%;
}
@media screen and (max-width: 1050px) {
body {
margin: 0 auto;
}
}
@media screen and (max-width: 767px) {
header span {
display: none;
}
h1 {
font-size: 26px;
}
h2 {
font-size: 20px;
}
}
@media screen and (max-width: 514px) {
p,
ul,
ol,
blockquote {
margin-bottom: 8%;
}
}

View File

@@ -1,59 +0,0 @@
/* Background */ .chroma { color: #f8f8f2; background-color: #272822 }
/* Error */ .chroma .err { color: #960050; background-color: #1e0010 }
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }
/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc }
/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; }
/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; }
/* Keyword */ .chroma .k { color: #66d9ef }
/* KeywordConstant */ .chroma .kc { color: #66d9ef }
/* KeywordDeclaration */ .chroma .kd { color: #66d9ef }
/* KeywordNamespace */ .chroma .kn { color: #f92672 }
/* KeywordPseudo */ .chroma .kp { color: #66d9ef }
/* KeywordReserved */ .chroma .kr { color: #66d9ef }
/* KeywordType */ .chroma .kt { color: #66d9ef }
/* NameAttribute */ .chroma .na { color: #a6e22e }
/* NameClass */ .chroma .nc { color: #a6e22e }
/* NameConstant */ .chroma .no { color: #66d9ef }
/* NameDecorator */ .chroma .nd { color: #a6e22e }
/* NameException */ .chroma .ne { color: #a6e22e }
/* NameFunction */ .chroma .nf { color: #a6e22e }
/* NameOther */ .chroma .nx { color: #a6e22e }
/* NameTag */ .chroma .nt { color: #f92672 }
/* Literal */ .chroma .l { color: #ae81ff }
/* LiteralDate */ .chroma .ld { color: #e6db74 }
/* LiteralString */ .chroma .s { color: #e6db74 }
/* LiteralStringAffix */ .chroma .sa { color: #e6db74 }
/* LiteralStringBacktick */ .chroma .sb { color: #e6db74 }
/* LiteralStringChar */ .chroma .sc { color: #e6db74 }
/* LiteralStringDelimiter */ .chroma .dl { color: #e6db74 }
/* LiteralStringDoc */ .chroma .sd { color: #e6db74 }
/* LiteralStringDouble */ .chroma .s2 { color: #e6db74 }
/* LiteralStringEscape */ .chroma .se { color: #ae81ff }
/* LiteralStringHeredoc */ .chroma .sh { color: #e6db74 }
/* LiteralStringInterpol */ .chroma .si { color: #e6db74 }
/* LiteralStringOther */ .chroma .sx { color: #e6db74 }
/* LiteralStringRegex */ .chroma .sr { color: #e6db74 }
/* LiteralStringSingle */ .chroma .s1 { color: #e6db74 }
/* LiteralStringSymbol */ .chroma .ss { color: #e6db74 }
/* LiteralNumber */ .chroma .m { color: #ae81ff }
/* LiteralNumberBin */ .chroma .mb { color: #ae81ff }
/* LiteralNumberFloat */ .chroma .mf { color: #ae81ff }
/* LiteralNumberHex */ .chroma .mh { color: #ae81ff }
/* LiteralNumberInteger */ .chroma .mi { color: #ae81ff }
/* LiteralNumberIntegerLong */ .chroma .il { color: #ae81ff }
/* LiteralNumberOct */ .chroma .mo { color: #ae81ff }
/* Operator */ .chroma .o { color: #f92672 }
/* OperatorWord */ .chroma .ow { color: #f92672 }
/* Comment */ .chroma .c { color: #75715e }
/* CommentHashbang */ .chroma .ch { color: #75715e }
/* CommentMultiline */ .chroma .cm { color: #75715e }
/* CommentSingle */ .chroma .c1 { color: #75715e }
/* CommentSpecial */ .chroma .cs { color: #75715e }
/* CommentPreproc */ .chroma .cp { color: #75715e }
/* CommentPreprocFile */ .chroma .cpf { color: #75715e }
/* GenericDeleted */ .chroma .gd { color: #f92672 }
/* GenericEmph */ .chroma .ge { font-style: italic }
/* GenericInserted */ .chroma .gi { color: #a6e22e }
/* GenericStrong */ .chroma .gs { font-weight: bold }
/* GenericSubheading */ .chroma .gu { color: #75715e }

View File

@@ -17,7 +17,7 @@ func Execute() error {
cfg := config.New()
app := &cli.App{
Name: "ocis-webdav",
Name: "webdav",
Version: version.String,
Usage: "Serve WebDAV API for oCIS",
Compiled: version.Compiled(),

View File

@@ -0,0 +1,78 @@
---
title: "Configuration"
date: "{{ date "2006-01-02T15:04:05-0700" now }}"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/extensions/webdav
geekdocFilePath: configuration.md
---
{{- 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 }}
{{`{{< 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/ocis_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`.
### Envrionment 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 "webdav" -}}
## Root Command
{{ $c.Usage }}
Usage: `webdav [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 "webdav" -}}
### webdav {{ $c.Name }}
{{ $c.Usage }}
Usage: `webdav {{ $c.Name }} [command options] [arguments...]`
{{ template "options" . }}
{{- end -}}
{{- end -}}
{{- end -}}