File: config.rst

package info (click to toggle)
slidge-matridge 0.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 948 kB
  • sloc: python: 2,035; xml: 127; makefile: 16
file content (75 lines) | stat: -rw-r--r-- 2,637 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
..  GENERATED FILE, DO NOT EDIT DIRECTLY

    This file is automatically generated using https://codeberg.org/slidge/legacy-module-template/
    Its source is at:
    https://codeberg.org/slidge/legacy-module-template/src/branch/main/docs/source/admin/config.rst.jinja
    Open a pull request for this repository instead, to benefit the documentation of all slidge-based gateways.

.. _config:

Configuration
=============

.. _config-file:

Config file location
********************

By default, matridge uses all config files found in ``/etc/slidge/conf.d/*``.
You can change this using the ``SLIDGE_CONF_DIR`` env var, eg ``SLIDGE_CONF_DIR=/path/dir1:/path/dir2:/path/dir3``.

It is recommended to use ``/etc/slidge/conf.d/`` to store configuration options
common to all slidge components (eg, attachment handling, logging options,
etc.), and to specify a plugin-specific file on startup, eg:

.. code-block:: bash

    slidge -c /etc/slidge/superduper.conf

matridge-specific config
************************

matridge provides the component-wide options displayed in the table below.
They can be used:

* as ``key=value`` in a :ref:`config file <config-file>`;
* as command line arguments, prepended with ``--``, e.g., ``--some-option=value``;
* as environment variables, upper case, prepended with ``MATRIDGE_``, and with dashes substituted with underscores, e.g., ``MATRIDGE_SOME_OPTION=value``.

.. config-obj:: matridge.config

.. _generic-config:

Generic slidge config
*********************

.. warning::

    Because of an ugly mess that will soon™ be fixed, it is impossible to use
    the config file to turn off boolean arguments that are true by default.
    As a workaround, use CLI args instead, e.g., ``--some-opt=false``.

The following options can be used:

* as ``key=value`` in a :ref:`config file <config-file>`;
* as command line arguments, prepended with ``--``, e.g., ``--some-option=value``;
* as environment variables, upper case, prepended with ``SLIDGE_``,
  and with dashes substituted with underscores, e.g., ``SLIDGE_SOME_OPTION=value``.


.. note::

    The following options are for slidge version |slidge_version|.
    Depending on how you installed matridge, you might have a different version of slidge.
    Use ``matridge --help`` for the exact list of options you can use.


.. config-obj:: slidge.core.config


Advanced logging configuration
******************************

To customize the output of the slidge, you can use the command line argument ``--log-config``
to specify a `logging configuration file
<https://docs.python.org/3/library/logging.config.html#configuration-file-format>`_.