Configuration

Default configuration for invenio-app-ils.

You overwrite and set instance-specific configuration by either:

  • Configuration file: <virtualenv prefix>/var/instance/invenio.cfg
  • Environment variables: APP_<variable name>
invenio_app_ils.config.ACCOUNTS_REST_READ_USERS_LIST_PERMISSION_FACTORY(*args, **kwargs)

Default list users permission factory: reject any request.

invenio_app_ils.config.ACCOUNTS_REST_READ_USER_PROPERTIES_PERMISSION_FACTORY(*args, **kwargs)

Default read user properties permission factory: reject any request.

invenio_app_ils.config.ACCOUNTS_REST_UPDATE_USER_PROPERTIES_PERMISSION_FACTORY(*args, **kwargs)

Default modify user properties permission factory: reject any request.

invenio_app_ils.config.ACCOUNTS_SESSION_REDIS_URL = 'redis://localhost:6379/1'

Redis session storage URL.

invenio_app_ils.config.APP_ALLOWED_HOSTS = ['localhost', '127.0.0.1']

Since HAProxy and Nginx route all requests no matter the host header provided, the allowed hosts variable is set to localhost. In production it should be set to the correct host and it is strongly recommended to only route correct hosts to the application.

invenio_app_ils.config.BABEL_DEFAULT_LANGUAGE = 'en'

Default language

invenio_app_ils.config.BABEL_DEFAULT_TIMEZONE = 'Europe/Zurich'

Default time zone

invenio_app_ils.config.BASE_TEMPLATE = 'invenio_theme/page.html'

Global base template.

invenio_app_ils.config.CELERY_BEAT_SCHEDULE = {'accounts': {'task': 'invenio_accounts.tasks.clean_session_table', 'schedule': datetime.timedelta(0, 3600)}, 'indexer': {'task': 'invenio_indexer.tasks.process_bulk_queue', 'schedule': datetime.timedelta(0, 300)}}

Scheduled tasks configuration (aka cronjobs).

invenio_app_ils.config.CELERY_BROKER_URL = 'amqp://guest:guest@localhost:5672/'

URL of message broker for Celery (default is RabbitMQ).

invenio_app_ils.config.CELERY_RESULT_BACKEND = 'redis://localhost:6379/2'

URL of backend for result storage (default is Redis).

invenio_app_ils.config.COLLECT_STORAGE = 'flask_collect.storage.file'

Static files collection method (defaults to copying files).

invenio_app_ils.config.COVER_TEMPLATE = 'invenio_theme/page_cover.html'

Cover page base template (used for e.g. login/sign-up).

invenio_app_ils.config.FOOTER_TEMPLATE = 'invenio_theme/footer.html'

Footer base template.

invenio_app_ils.config.HEADER_TEMPLATE = 'invenio_theme/header.html'

Header base template.

invenio_app_ils.config.I18N_LANGUAGES = []

Other supported languages (do not include the default language in list).

invenio_app_ils.config.ILS_VIEWS_PERMISSIONS_FACTORY(action)

Permissions factory for ILS views to handle all ILS actions.

invenio_app_ils.config.JSONSCHEMAS_HOST = '127.0.0.1:5000'

Hostname used in URLs for local JSONSchemas.

invenio_app_ils.config.MAIL_SUPPRESS_SEND = True

Disable email sending by default.

invenio_app_ils.config.MAX_CONTENT_LENGTH = 104857600

Max upload size for form data via application/mulitpart-formdata.

invenio_app_ils.config.RATELIMIT_STORAGE_URL = 'redis://localhost:6379/3'

Storage for ratelimiter.

invenio_app_ils.config.RECORDS_EDITOR_URL_PREFIX = '/editor'

Default URL we want to serve our editor application, i.e /editor.

invenio_app_ils.config.SECRET_KEY = 'CHANGE_ME'

Secret key - each installation (dev, production, …) needs a separate key. It should be changed before deploying.

invenio_app_ils.config.SECURITY_EMAIL_SENDER = 'info@inveniosoftware.org'

Email address used as sender of account registration emails.

invenio_app_ils.config.SECURITY_EMAIL_SUBJECT_REGISTER = 'Welcome to invenio-app-ils!'

Email subject for account registration emails.

Sets cookie with the secure flag by default

invenio_app_ils.config.SETTINGS_TEMPLATE = 'invenio_theme/page_settings.html'

Settings base template.

invenio_app_ils.config.SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://test:psw@localhost/ils'

Database URI including user and password

invenio_app_ils.config.SUPPORT_EMAIL = 'info@inveniosoftware.org'

Email address for support.