Configuration ------------- The application can be configured with a configuration file, via command line arguments or by environment variables. All configuration options have default values. If a configuration option is specified in more than one place, then command line values override environment variables which override configuration file values which override defaults. This lists some of the available configuration options. Use --help to list all available options. .. program:: kuha_ds_serve, kuha_db_setup .. option:: -h, --help Show help message and exit. .. option:: --print-configuration Print active configuration and exit. .. option:: --port Port of Kuha document store database. Defaults to ยด`6001``. May also be controlled by setting environment variable: ``KUHA_DS_PORT``. .. option:: --replica MongoDB replica host and port. Repeat for multiple replicas. May also be controlled by setting environment variable: ``KUHA_DS_DBREPLICAS``. **Configuration file** Args that start with '--' (eg. --document-store-port) can also be set in a config file. The configuration file lookup searches the file from current working directory and from the package directory. The name of the default configuration file is ``kuha_document_store.ini``, and can be set via configuration option ``--config``. .. Note:: Invoke with ``--help`` to print out config file lookup paths. **Environment variables** If the program will be run by using the scripts provided in ``scripts`` subdirectory, the runtime environment can be controlled via ``scripts/runtime_env``, which will be created by copying from ``scripts/runtime_env.dist`` at installation time by ``scripts/install_kuha_document_store_virtualenv.sh``.