Configuration
Bunny can be configured using environment variables.
If you’re running Bunny as part of a composed stack of containers, these are set in the compose.yml
.
services:
bunny:
image: ghcr.io/health-informatics-uon/hutch/bunny:edge
environment:
- DATASOURCE_DB_USERNAME=postgres
- DATASOURCE_DB_PASSWORD=postgres
- DATASOURCE_DB_DATABASE=postgres
- DATASOURCE_DB_DRIVERNAME=postgresql
- DATASOURCE_DB_SCHEMA=public
- DATASOURCE_DB_PORT=5432
- DATASOURCE_DB_HOST=db
- TASK_API_BASE_URL=http://relay:8080/link_connector_api
- TASK_API_USERNAME=username
- TASK_API_PASSWORD=password
- TASK_API_TYPE=a
- COLLECTION_ID=collection_id
- LOW_NUMBER_SUPPRESSION_THRESHOLD=10
- ROUNDING_TARGET=10
Task API
Name | Type | Description | Default |
---|---|---|---|
TASK_API_BASE_URL * | string | RQUEST API URL | |
TASK_API_USERNAME * | string | API username | |
TASK_API_PASSWORD * | string | API Password | |
COLLECTION_ID * | string | API collection_id | |
TASK_API_TYPE | "a,b,c" | Specifies the task type to query for, needed if connecting to RQUEST | |
TASK_API_ENFORCE_HTTPS | boolean | Specifies whether to enforce a HTTPS TASK_API_BASE_URL | true |
To configure Bunny to communicate with a Task API, such as Relay or RQuest, the TASK_API
variables must be set.
Host examples:
- If Bunny and Relay are running in the same Docker Compose stack, the host should be the Relay service name in the stack, e.g.
http://relay
- If you have Relay running locally, and Bunny running locally, the host should be
http://localhost
- If you have any Task API running elsewhere, the host should be e.g.
https://my-task-api.com
with the correct hostname - The Base URL should include
/link_connector_api
at the end of the path - Requests from Bunny are authenticated by the
TASK_API_USERNAME
andTASK_API_PASSWORD
, please put your Task API credentials here
Task Type
If you would like Bunny to connect directly with RQUEST, you need to add TASK_API_TYPE
.
This can only be either a
(Availability), b
(Distribution and PHEWAS) or c
(AnalyticsGwas, AnalyticsGwasQuantitiveTrait, AnalyticsBurdenTest).
Further guidance is available in the Connect to RQuest How To Guide.
Database
The database connection is configured by the variables prefixed with DATASOURCE_
Name | Type | Description | Default |
---|---|---|---|
DATASOURCE_DB_USERNAME * | string | Database username | trino-user |
DATASOURCE_DB_PASSWORD * | string | Database password | |
DATASOURCE_DB_DATABASE * | string | Database name | |
DATASOURCE_DB_SCHEMA * | string | Database schema | |
DATASOURCE_DB_PORT * | string | Database port | |
DATASOURCE_DB_HOST * | string | Database host | |
DATASOURCE_DB_DRIVERNAME | "postgresql,mssql" | Database dialect | postgresql |
DATASOURCE_DB_CATALOG | string | Trino catalog name | |
DATASOURCE_USE_TRINO | boolean | Use Trino to connect | False |
Disclosure Control
Name | Type | Description | Default |
---|---|---|---|
LOW_NUMBER_SUPPRESSION_THRESHOLD | integer | Specifies the minimum number of individuals required for a result to be returned; counts below this threshold are suppressed. | 10 |
ROUNDING_TARGET | integer | Specifies the value to which all returned counts are rounded | 10 |
- Low number suppression defaults to ON with a value of 10 such that any result with a count below 10 will return 0.
- Rounding defaults to ON with a value of 10 such that results are returned to the nearest 10.
Read more about disclosure controls.
Polling
Name | Type | Description | Default |
---|---|---|---|
POLLING_INTERVAL | integer | Specifies how often (seconds) the Task API is polled for new jobs | 5 |
INITIAL_BACKOFF | integer | Specifies the starting wait time (seconds) before retrying after a network error | 5 |
MAX_BACKOFF | integer | Sets the maximum wait time (seconds) that exponential backoff can reach after repeated failures | 60 |
Logging
Name | Type | Description | Default |
---|---|---|---|
BUNNY_LOGGER_LEVEL | "DEBUG,INFO,WARNING,ERROR,CRITICAL" | Specifies the logging level | INFO |