3. Configuration

Backends required by Ferda are configured in .conf files. There will be example configuration files included (fred-registry-services.conf.example and fred-logger-services.conf.example).

3.1. Environment

Ferda’s behaviour can be modified by configuring the following variables in the .env file in the directory from which docker-compose is run:

Variables

Name

Default value

Description

ADMINS

''

List of names and e-mails with names separated from e-mails by colons and individual admins separated by commas (e.g. John Doe:john.doe@example.com,Jane Doe:jane.doe@example.com)

ALLOWED_HOSTS

* (if DEBUG=true, else an empty list)

Comma-separated list of hosts; this variable needs to be set, unless you are in DEBUG mode. Otherwise, you will not be able to access Ferda on any hostname.

DATABASE_URL

sqlite:////app/db.sqlite3

Very important variable defining the connection with database; it is highly recommended to change the default value, otherwise the database gets lost when the container is deleted; format for PostgreSQL is psql://USER:PASSWORD@HOST:PORT/NAME

DEBUG

false

Enabling/disabling debug mode; true/false

DEFAULT_FROM_EMAIL EMAIL_HOST
EMAIL_HOST_USER
EMAIL_HOST_PASSWORD
EMAIL_PORT
SERVER_EMAIL

localhost
''
''
webmaster@localhost
25
root@localhost

Various e-mail settings (more details at https://docs.djangoproject.com/en/dev/ref/settings/)

FERDA_LOGGER_NETLOC

gloss:50051 (value working when using docker-compose from gloss)

Logging server address

FERDA_REGISTRY_NETLOC

required

Configuration, address and port of the server running fred-backend-registry

FIDO_ENABLED

false

Enabling/disabling two-factor authentication via FIDO2 tokens; true/false

LANGUAGE_CODE

en

system language

LANGUAGES

en:English,cs:Česky

List of available languages, format is similar as ADMINS

LDAP_AUTH_URL
LDAP_AUTH_USE_TLS
LDAP_AUTH_SEARCH_BASE

None
True
N/A

LDAP configuration variables (see https://github.com/etianen/django-python3-ldap); authentication via LDAP is enabled only when the LDAP_AUTH_URL variable is defined and in case the support for LDAP was enabled during the image build using EXTRAS=ldap.

SECRET_KEY

required

Long random string; sensitive data

SESSION_COOKIE_AGE

1200

Age of session cookie; the user will be automatically logged out after this period of inactivity (in seconds).

SESSION_SAVE_EVERY_REQUEST

true

Enabling/disabling session saving after every request; true/false

TIME_ZONE

UTC

Time zone