From 12897e61cb429aee7715228c26d23fe4af7b8015 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Wed, 23 Dec 2020 09:19:32 +0100 Subject: [PATCH] add multiple env vars to templates --- accounts/templates/CONFIGURATION.tmpl | 4 +++- glauth/templates/CONFIGURATION.tmpl | 4 +++- konnectd/templates/CONFIGURATION.tmpl | 4 +++- ocis/templates/CONFIGURATION.tmpl | 4 +++- ocs/templates/CONFIGURATION.tmpl | 4 +++- onlyoffice/templates/CONFIGURATION.tmpl | 4 +++- proxy/templates/CONFIGURATION.tmpl | 4 +++- settings/templates/CONFIGURATION.tmpl | 4 +++- storage/templates/CONFIGURATION.tmpl | 6 ++++-- store/templates/CONFIGURATION.tmpl | 4 +++- thumbnails/templates/CONFIGURATION.tmpl | 4 +++- web/templates/CONFIGURATION.tmpl | 4 +++- webdav/templates/CONFIGURATION.tmpl | 4 +++- 13 files changed, 40 insertions(+), 14 deletions(-) diff --git a/accounts/templates/CONFIGURATION.tmpl b/accounts/templates/CONFIGURATION.tmpl index 66aa779c5..e56dd4239 100644 --- a/accounts/templates/CONFIGURATION.tmpl +++ b/accounts/templates/CONFIGURATION.tmpl @@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl {{ range $opt := first . }}{{ with list $fnName $opt -}} {{ $o := last . -}} {{ if eq $o.FnName $fnName -}} ---{{ $o.Name }} | ${{ index $o.Env 0 }} +-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }} : {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }} {{ end -}} @@ -41,6 +41,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full If you prefer to configure the service with environment variables you can see the available variables below. +If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given. + ### 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. diff --git a/glauth/templates/CONFIGURATION.tmpl b/glauth/templates/CONFIGURATION.tmpl index e46dd9a74..1b8e77928 100644 --- a/glauth/templates/CONFIGURATION.tmpl +++ b/glauth/templates/CONFIGURATION.tmpl @@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl {{ range $opt := first . }}{{ with list $fnName $opt -}} {{ $o := last . -}} {{ if eq $o.FnName $fnName -}} ---{{ $o.Name }} | ${{ index $o.Env 0 }} +-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }} : {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }} {{ end -}} @@ -41,6 +41,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full If you prefer to configure the service with environment variables you can see the available variables below. +If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given. + ### 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. diff --git a/konnectd/templates/CONFIGURATION.tmpl b/konnectd/templates/CONFIGURATION.tmpl index fd3928db0..4b70fdbda 100644 --- a/konnectd/templates/CONFIGURATION.tmpl +++ b/konnectd/templates/CONFIGURATION.tmpl @@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl {{ range $opt := first . }}{{ with list $fnName $opt -}} {{ $o := last . -}} {{ if eq $o.FnName $fnName -}} ---{{ $o.Name }} | ${{ index $o.Env 0 }} +-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }} : {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }} {{ end -}} @@ -41,6 +41,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full If you prefer to configure the service with environment variables you can see the available variables below. +If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given. + ### 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. diff --git a/ocis/templates/CONFIGURATION.tmpl b/ocis/templates/CONFIGURATION.tmpl index 71cd95483..d86a7033c 100644 --- a/ocis/templates/CONFIGURATION.tmpl +++ b/ocis/templates/CONFIGURATION.tmpl @@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl {{ range $opt := first . }}{{ with list $fnName $opt -}} {{ $o := last . -}} {{ if eq $o.FnName $fnName -}} ---{{ $o.Name }} | ${{ index $o.Env 0 }} +-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }} : {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }} {{ end -}} @@ -45,6 +45,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full If you prefer to configure the service with environment variables you can see the available variables below. +If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given. + ### 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. diff --git a/ocs/templates/CONFIGURATION.tmpl b/ocs/templates/CONFIGURATION.tmpl index 614ed317e..55d5b95aa 100644 --- a/ocs/templates/CONFIGURATION.tmpl +++ b/ocs/templates/CONFIGURATION.tmpl @@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl {{ range $opt := first . }}{{ with list $fnName $opt -}} {{ $o := last . -}} {{ if eq $o.FnName $fnName -}} ---{{ $o.Name }} | ${{ index $o.Env 0 }} +-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }} : {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }} {{ end -}} @@ -41,6 +41,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full If you prefer to configure the service with environment variables you can see the available variables below. +If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given. + ### 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. diff --git a/onlyoffice/templates/CONFIGURATION.tmpl b/onlyoffice/templates/CONFIGURATION.tmpl index 9d59cc321..1919e5735 100644 --- a/onlyoffice/templates/CONFIGURATION.tmpl +++ b/onlyoffice/templates/CONFIGURATION.tmpl @@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl {{ range $opt := first . }}{{ with list $fnName $opt -}} {{ $o := last . -}} {{ if eq $o.FnName $fnName -}} ---{{ $o.Name }} | ${{ index $o.Env 0 }} +-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }} : {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }} {{ end -}} @@ -45,6 +45,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full If you prefer to configure the service with environment variables you can see the available variables below. +If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given. + ### 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. diff --git a/proxy/templates/CONFIGURATION.tmpl b/proxy/templates/CONFIGURATION.tmpl index c18cf7e7b..f2097e446 100644 --- a/proxy/templates/CONFIGURATION.tmpl +++ b/proxy/templates/CONFIGURATION.tmpl @@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl {{ range $opt := first . }}{{ with list $fnName $opt -}} {{ $o := last . -}} {{ if eq $o.FnName $fnName -}} ---{{ $o.Name }} | ${{ index $o.Env 0 }} +--{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }} : {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }} {{ end -}} @@ -41,6 +41,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full If you prefer to configure the service with environment variables you can see the available variables below. +If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given. + ### 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. diff --git a/settings/templates/CONFIGURATION.tmpl b/settings/templates/CONFIGURATION.tmpl index d0379013f..b918d8c2c 100644 --- a/settings/templates/CONFIGURATION.tmpl +++ b/settings/templates/CONFIGURATION.tmpl @@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl {{ range $opt := first . }}{{ with list $fnName $opt -}} {{ $o := last . -}} {{ if eq $o.FnName $fnName -}} ---{{ $o.Name }} | ${{ index $o.Env 0 }} +-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }} : {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }} {{ end -}} @@ -41,6 +41,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full If you prefer to configure the service with environment variables you can see the available variables below. +If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given. + ### 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. diff --git a/storage/templates/CONFIGURATION.tmpl b/storage/templates/CONFIGURATION.tmpl index 78b5b5ac3..109c7ae2f 100644 --- a/storage/templates/CONFIGURATION.tmpl +++ b/storage/templates/CONFIGURATION.tmpl @@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl {{ range $opt := first . }}{{ with list $fnName $opt -}} {{ $o := last . -}} {{ if eq $o.FnName $fnName -}} ---{{ $o.Name }} | ${{ index $o.Env 0 }} +-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }} : {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }} {{ end -}} @@ -24,7 +24,7 @@ geekdocFilePath: CONFIGURATION.tmpl {{- range $o := $options }}{{ with (list $o $oName) -}} {{- $o := first . }} {{- if eq $o.FnName (last .) -}} ---{{ $o.Name }} | ${{ index $o.Env 0 }} +-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }} : {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }} {{ end -}} @@ -54,6 +54,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full If you prefer to configure the service with environment variables you can see the available variables below. +If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given. + ### 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. diff --git a/store/templates/CONFIGURATION.tmpl b/store/templates/CONFIGURATION.tmpl index a5b5d071c..d62b48443 100644 --- a/store/templates/CONFIGURATION.tmpl +++ b/store/templates/CONFIGURATION.tmpl @@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl {{ range $opt := first . }}{{ with list $fnName $opt -}} {{ $o := last . -}} {{ if eq $o.FnName $fnName -}} ---{{ $o.Name }} | ${{ index $o.Env 0 }} +-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }} : {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }} {{ end -}} @@ -41,6 +41,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full If you prefer to configure the service with environment variables you can see the available variables below. +If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given. + ### 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. diff --git a/thumbnails/templates/CONFIGURATION.tmpl b/thumbnails/templates/CONFIGURATION.tmpl index 1c92e4ca5..39b017593 100644 --- a/thumbnails/templates/CONFIGURATION.tmpl +++ b/thumbnails/templates/CONFIGURATION.tmpl @@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl {{ range $opt := first . }}{{ with list $fnName $opt -}} {{ $o := last . -}} {{ if eq $o.FnName $fnName -}} ---{{ $o.Name }} | ${{ index $o.Env 0 }} +-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }} : {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }} {{ end -}} @@ -41,6 +41,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full If you prefer to configure the service with environment variables you can see the available variables below. +If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given. + ### 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. diff --git a/web/templates/CONFIGURATION.tmpl b/web/templates/CONFIGURATION.tmpl index 2876ca8e6..2a43964eb 100644 --- a/web/templates/CONFIGURATION.tmpl +++ b/web/templates/CONFIGURATION.tmpl @@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl {{ range $opt := first . }}{{ with list $fnName $opt -}} {{ $o := last . -}} {{ if eq $o.FnName $fnName -}} ---{{ $o.Name }} | ${{ index $o.Env 0 }} +-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }} : {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }} {{ end -}} @@ -41,6 +41,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full If you prefer to configure the service with environment variables you can see the available variables below. +If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given. + ### 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. diff --git a/webdav/templates/CONFIGURATION.tmpl b/webdav/templates/CONFIGURATION.tmpl index d746231ce..7aea1bee5 100644 --- a/webdav/templates/CONFIGURATION.tmpl +++ b/webdav/templates/CONFIGURATION.tmpl @@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl {{ range $opt := first . }}{{ with list $fnName $opt -}} {{ $o := last . -}} {{ if eq $o.FnName $fnName -}} ---{{ $o.Name }} | ${{ index $o.Env 0 }} +-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }} : {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }} {{ end -}} @@ -41,6 +41,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full If you prefer to configure the service with environment variables you can see the available variables below. +If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given. + ### 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.