Move default config into separate file

This commit is contained in:
eikek
2022-05-21 17:00:27 +02:00
parent 37bdbbb435
commit 084dcef996
11 changed files with 61 additions and 30 deletions

View File

@ -46,7 +46,7 @@ an OpenID Provider (OP) somewhere and to configure Docspell
accordingly to act as the relying party.
You can define multiple OPs to use. For some examples, please see the
[default configuration](@/docs/configure/main.md#default-config).
[default configuration](@/docs/configure/defaults.md).
The configuration of a provider highly depends on how it is setup.
Here is an example for a setup using

View File

@ -0,0 +1,50 @@
+++
title = "Default Configuration"
insert_anchor_links = "right"
description = "Shows the default settings."
weight = 100
template = "docs.html"
+++
## Default Configuration
Below is the default config file for the restserver and joex. If you
create a config file, you only need to include settings that differ
from the default config.
## Rest Server
{{ incl_conf(path="templates/shortcodes/server.conf") }}
## Joex
{{ incl_conf(path="templates/shortcodes/joex.conf") }}
## Environment Variables
Environment variables can be used when there is no config file
supplied.
There is one caveat: The configuration files above reuse values by
referencing them. This applies for example to the `app-id` - it is
used at other places, where the config file simply references it via
its full path. For example for the scheduler name, the default value
is `${docspell.joex.app-id}`. This way the value of `scheduler.name`
is always the same as `app-id`. But this doesn't work with env
variables! Here you'd need to update each such value.
For example, when creating multiple joex', they must have different
`app-id`s and with this, these values need to be set as well:
```
DOCSPELL_JOEX_APP__ID=joex2
DOCSPELL_JOEX_PERIODIC__SCHEDULER_NAME=joex2
DOCSPELL_JOEX_SCHEDULER_NAME=joex2
```
The listing below shows all possible variables and their default
values.
{{ incl_conf(path="templates/shortcodes/config.env.txt") }}

View File

@ -47,7 +47,7 @@ read and write permissions.
{% end %}
The file storage backend can be configured inside the `files` section
(see the [default configs](@/docs/configure/main.md#default-config)):
(see the [default configs](@/docs/configure/defaults.md)):
```conf
files {

View File

@ -14,7 +14,7 @@ configuration is in this config only.
File processing involves several stages, detailed information can be
found [here](@/docs/joex/file-processing.md#text-analysis) and in the
corresponding sections in [joex default
config](@/docs/configure/main.md#joex).
config](@/docs/configure/defaults.md#joex).
Configuration allows to define the external tools and set some
limitations to control memory usage. The sections are:

View File

@ -49,7 +49,7 @@ subsection:
}
```
The [default configuration](@/docs/configure/main.md#default-config)
The [default configuration](@/docs/configure/defaults.md)
contains more information about each setting.
The `solr.url` is the mandatory setting that you need to change to

View File

@ -176,22 +176,3 @@ via environment variables. There are these settings:
The default settings for joex and restserver are the same and
configure a minimum level of `Warn` and override some loggers with
`Info`.
# Default Config
## Rest Server
{{ incl_conf(path="templates/shortcodes/server.conf") }}
## Joex
{{ incl_conf(path="templates/shortcodes/joex.conf") }}
## Environment Variables
Environment variables can be used when there is no config file
supplied. The listing below shows all possible variables and their
default values.
{{ incl_conf(path="templates/shortcodes/config.env.txt") }}