core: Allow configuring DB/auth from environment
Add support for environment variables to configure database and
authenticator backends. This improves using Quassel in a container
-based system as no configuration file needs to be written.
Toggle use of environment variables via a new CLI switch,
'--config-from-environment', which will disregard the core settings
file (if it exists) and use environment variables instead.
New environment variables:
> Backend selection
DB_BACKEND = ["SQLite", "PostgreSQL"]
AUTH_AUTHENTICATOR = ["Database", "LDAP"]
> PostgreSQL connection properties
DB_PGSQL_USERNAME
DB_PGSQL_PASSWORD
DB_PGSQL_HOSTNAME
DB_PGSQL_PORT
DB_PGSQL_DATABASE
> LDAP connection properties
AUTH_LDAP_HOSTNAME
AUTH_LDAP_PORT
AUTH_LDAP_BIND_DN
AUTH_LDAP_BIND_PASSWORD
AUTH_LDAP_BASE_DN
AUTH_LDAP_FILTER
AUTH_LDAP_UID_ATTRIBUTE
Closes GH-341.
14 files changed: