Configuration¶
Configuration for Asclepias Broker.
See also Invenio-Config
for more details, like e.g. how to override configuration via environment
variables or an invenio.cfg
file.
-
asclepias_broker.config.
SECRET_KEY
= 'CHANGE_ME'¶ Flask’s
SECRET_KEY
. This is an essential variable that has to be set before deploying the broker service to a production environment. It’s used by Invenio/Flask in various places for encrypting/hashing/signing sessions, passwords, tokens, etc. You can generate one using:python -c 'import os; print(os.urandom(32))'
-
asclepias_broker.config.
SQLALCHEMY_DATABASE_URI
= 'postgresql+psycopg2://asclepias:asclepias@localhost/asclepias'¶ SQLAlchemy database connection string.
See also SQLAlchemy’s Database Urls docs.
-
asclepias_broker.config.
SEARCH_ELASTIC_HOSTS
= [{'host': 'localhost', 'port': 9200}]¶ Elasticsearch hosts configuration.
For a single-node cluster you can configure the connection via the following environment variables:
ELASTICSEARCH_HOST
andELASTICSEARCH_PORT
.localhost
and9200
by default respectivelyELASTICSEARCH_URL_PREFIX
. URL prefix for the Elasticsearch host, e.g.es
would result in usinghttp://localhost:9200/es
ELASTICSEARCH_USER
andELASTICSEARCH_PASSWORD
. Used for Basic HTTP authentication. By default not setELASTICSEARCH_USE_SSL
andELASTICSEARCH_VERIFY_CERTS
For more complex multi-node cluster setups see Invenio-Search documentation.
-
asclepias_broker.config.
REDIS_BASE_URL
= 'redis://localhost:6379'¶ Redis base host URL.
Used for Celery results, rate-limiting and session storage. Can be set via the environment variable
REDIS_BASE_URL
.
-
asclepias_broker.config.
BROKER_URL
= 'amqp://guest:guest@localhost:5672/'¶ Celery broker URL.
See also Celery’s documentation.
-
asclepias_broker.config.
SENTRY_DSN
= None¶ Sentry DSN for logging errors and warnings.
-
asclepias_broker.config.
ASCLEPIAS_SEARCH_INDEXING_ENABLED
= True¶ Determines if the search index will be updated after ingesting an event