2. Settings¶
General configuration settings are discussed in this chapter, while settings related to external systems can be found in External Services.
2.1. General settings¶
This chapter describes the general settings for the QueryBuilder.
-
API_URL
¶ The URL for the API, e.g.
https://querybuilder.example.com/api/v1
.
-
BASE_URL
¶ The base URL, e.g.
https://querybuilder.example.com
.
-
LOGO_URL
¶ The URL where the browser is directed to when the user clicks on the logo, e.g.
https://querybuilder.example.com/projects
.
-
CONTACT_EMAIL
¶ Support email address for e.g. users having trouble logging in.
-
EXEC_RECIPE_MODULE
¶ Path to a recipe file, e.g.
app.recipes.example
. In this example there should be a file namedexample.py
in theapp/recipes
directory.
-
GLOBAL_OWNER_EMAIL
¶ Email address of a datasteward who is authorized to approve for all projects. If this setting is not used, individual projects must be provisioned with an owner email address.
-
LOCAL_TIMEZONE
¶ Timestamps are stored in UTC and this setting is used to translate to the local timezone of the users, e.g.
Europe/Amsterdam
.
-
LOG_LEVEL
¶ The application log level. Value can be
debug
,info
,warning
,error
orcritical
.
2.2. Concurrency settings¶
-
WORKERS
¶ The number of worker processes that will be forked to handle incoming requests. Setting this is optional, but may be required in environments where the default value does not correspond with the actual resources available. Default is twice the number of available cpu cores.
-
SQLALCHEMY_ENGINE_OPTIONS
¶ A dictionary that can contain options for the model database engine, most notably to change the connection pool characteristics.
pool_size
: The size of the connection pool that is held per worker process towards the model database. Default is 5.pool_timeout
: The number of seconds to wait before giving up on returning a connection. Defaults to 30.pool_recycle
: The number of seconds between which to allow connection reuse, since it was used last. Defaults to -1, which indicates off.pool_pre_ping
: Boolean to indicate that a pooled connection needs to be checked before actual use.
Example configuration fragment:
SQLALCHEMY_ENGINE_OPTIONS = { 'pool_size' : 2, 'pool_recycle': 120, 'pool_pre_ping': True }
2.3. Database settings¶
-
APP_DB_HOST
¶ The hostname of the application model database, e.g.
postgres
.
-
APP_DB_PORT
¶ The port number of the application model database, e.g.
5432
.
-
APP_DB_USER
¶ The username for the application model database, e.g.
querybuilder
.
-
APP_DB_PASSWORD
¶ The password for the application model database, e.g.
secret
.
-
APP_DB_NAME
¶ The name of the application model database, e.g.
querybuilder
.
-
APP_DATABASE_URL
¶ The URL of the application model database, e.g.
postgresql://querybuilder:secret@postgres:5432/querybuilder
. In the default configuration file, this is built up by theAPP_DB_*
settings.
2.4. Interface settings¶
-
IMG_LOGO
¶ Path to a logo image, e.g.
/static/images/mgrid_logo.svg
.
-
IMG_LOGO_LARGE
¶ Path to a large logo image, e.g.
/static/images/mgrid_logo.svg
.
-
BUTTON_APPROVAL
¶ Text to display inside the button for requesting approval when in the project screen. Default is
Request Approval
.
-
BUTTON_EXPORT
¶ Text to display inside the button for requesting export when in the project screen. Default is
Perform Transfer
.
-
BUTTON_SCHEDULE
¶ Text to display inside the button for scheduling export when in the project screen. Default is
Schedule Transfer
.
-
MODAL_APPROVAL
¶ Text to display inside the approval modal in front of the queries for which approval has been requested. Default is
Requested approval for:
.
-
MODAL_EXPORT
¶ Text to display inside the export modal in front of the queries for which the export action has been requested. Default is
Performing transfer for:
.
-
MODAL_SCHEDULE
¶ Text to display inside the schedule modal in front of the queries for which the schedule action has been requested. Default is
Schedule transfer for:
.
-
STATUS_APPROVED
¶ Status text to display if query is approved. Default is
Ready for transfer
.
-
STATUS_EMPTY_QUERY
¶ Status text to display if query is empty. Default is
Empty query
.
-
STATUS_NEED_APPROVAL
¶ Status text to display if query needs approval for transfer. Default is
Need approval for transfer
.
-
STATUS_REQUESTED_APPROVAL
¶ Status text to display if approval has been requested for approval. Default is
Requested approval for transfer
.
-
STATUS_UNKNOWN
¶ Status text to display if status is unknown. Default is
Approval server offline
.
-
JOB_UPDATE_INTERVAL
¶ How many seconds between job status updates, e.g.
10
.
2.5. Security settings¶
-
JWT_SECRET_KEY
¶ The JWT secret key that is used to authenticate requests to the manegement API, e.g.
jwt_secret
.
-
SESSION_COOKIE_PATH
¶ Path for the session cookies, e.g.
/
.
-
SESSION_COPY_PROTECTION
¶ User supplied session cookies are checked for changes in client ip and user agent string. If these change after the start of a session, the user is logged out. Default is
True
.
2.6. Audit settings¶
-
AUDIT_ENABLED
¶ Enable or disable audit logging to a central FluentD server, e.g.
True
.
-
AUDIT_SERVER
¶ Hostname of the central FluentD server, e.g.
fluent
.
-
AUDIT_PORT
¶ Optional. Port number of the central FluentD server, default is
24224
.
-
AUDIT_TAG
¶ Optional. Tag used for all logs sent to the central FluentD server, default is
audit
.
-
AUDIT_LABEL
¶ Optional. Label used for all logs sent to the central FluentD server, default is
log
.
-
AUDIT_APPLICATION_CODE
¶ Optional. Name of the application, default is
querybuilder
.
-
AUDIT_APPLICATION_INSTANCE
¶ Optional. Instance name of the application, default is
default
.
-
AUDIT_APPLICATION_IP
¶ Optional. IP address of the application instance, default is
127.0.0.1
.