Add commented examples to conf file and update Readme.md

This commit is contained in:
Anton Melser 2019-01-29 12:39:10 +08:00
parent fa89b0e0a2
commit 6c82bad882
2 changed files with 21 additions and 1 deletions

View File

@ -160,10 +160,20 @@ remove every line starting with "pyaudio" in requirements.txt
$ sed -i '/^pyaudio/d' requirements.txt
ENVVAR configuration overrides
==============================
------------------------------
Configuration values can be set via environment variables using `ANKISYNCD_` prepended
to the uppercase form of the configuration value. E.g. the environment variable,
`ANKISYNCD_AUTH_DB_PATH` will set the configuration value `auth_db_path`
Environment variables override the values set in the `ankisyncd.conf`.
Support for other database backends
-----------------------------------
sqlite3 is used by default for user data, authentication and session persistence.
`ankisyncd` supports loading classes defined via config that manage most
persistence requirements (the media DB and files are being worked on). All that is
required is to extend one of the existing manager classes and then reference those
classes in the config file. See ankisyncd.conf for example config.

View File

@ -8,3 +8,13 @@ base_media_url = /msync/
auth_db_path = ./auth.db
# optional, for session persistence between restarts
session_db_path = ./session.db
# optional, for overriding the default managers and wrappers
# # must inherit from ankisyncd.persistence.PersistenceManger, e.g,
# persistence_manager = great_stuff.postgres.PostgresPersistenceManager
# # must inherit from ankisyncd.session.SimpleSessionManager, e.g,
# session_manager = great_stuff.postgres.PostgresSessionManager
# # must inherit from ankisyncd.user.SimpleUserManager, e.g,
# user_manager = great_stuff.postgres.PostgresUserManager
# # must inherit from ankisyncd.collections.CollectionWrapper, e.g,
# collection_wrapper = great_stuff.postgres.PostgresCollectionWrapper