forked from Github-Mirrors/canaille
doc: CLI configuration instructions details
This commit is contained in:
parent
a1f298cf70
commit
9746a9af3c
2 changed files with 9 additions and 5 deletions
|
@ -3,13 +3,14 @@ Command Line Interface
|
|||
|
||||
Canaille provide several commands to help administrator manage their data.
|
||||
|
||||
The configuration file has to be prefixed before running `canaille`. For readability's sake, it's omitted in the examples.
|
||||
Generally, some configuration has to be loaded by `Canaille`.
|
||||
This can be achieved by :ref:`configuration loading method<references/configuration:Load the configuration>` available, but most of the time a ``CONFIG`` environent variable is used.
|
||||
For the sake of readability, it is omitted in the following examples.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
env CONFIG=path/to/config.toml canaille ...
|
||||
|
||||
|
||||
.. _cli_check:
|
||||
|
||||
.. click:: canaille.app.commands:check
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
Configuration
|
||||
#############
|
||||
|
||||
Load the configuration
|
||||
======================
|
||||
|
||||
Canaille can be configured either by a environment variables, environment file, or by a configuration file.
|
||||
|
||||
Configuration file
|
||||
==================
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The configuration can be written in `toml` configuration file which path is passed in the :envvar:`CONFIG` environment variable.
|
||||
|
||||
|
@ -23,7 +26,7 @@ The configuration can be written in `toml` configuration file which path is pass
|
|||
You can have a look at the :ref:`example file <references/configuration:Example file>` for inspiration.
|
||||
|
||||
Environment variables
|
||||
=====================
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
In addition, parameters that have not been set in the configuration file can be read from environment variables.
|
||||
The way environment variables are parsed can be read from the `pydantic-settings documentation <https://docs.pydantic.dev/latest/concepts/pydantic_settings/#parsing-environment-variable-values>`_.
|
||||
|
@ -34,7 +37,7 @@ The way environment variables are parsed can be read from the `pydantic-settings
|
|||
For instance, the ``NAME`` var in the ``CANAILLE`` section shown above is ``CANAILLE__NAME``.
|
||||
|
||||
Environment file
|
||||
================
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
Any environment variable can also be written in a ``.env``, and will be read if present.
|
||||
|
||||
|
|
Loading…
Reference in a new issue