Configuration
Relay can be configured using environment variables, or any approach supported by ASP.NET Core
Your desired approach may differ depending on the environment you’re configuring, e.g.:
If you’re running Relay as part of a composed stack of containers, we recommend setting environment variables in the compose.yml
.
For example:
services:
# ...
relay:
# ...
environment:
ConnectionStrings__Default: Server=db_host;Port=5432;Database=hutch-relay;User Id=postgres;Password=postgres
RelayTaskQueue__ConnectionString: amqp://user:password@rabbitmq:5672
UpstreamTaskApi__BaseUrl: https://my-task-api.com
UpstreamTaskApi__CollectionId: dd52026b-5a61-4c89-b733-04ba141b3f31
UpstreamTaskApi__Username: user
UpstreamTaskApi__Password: password
# ...
Upstream Task API
Configuration Section: UptreamTaskApi
Key | Description |
---|---|
BaseUrl * | The Base URL for an Upstream Task API that Relay should fetch jobs from.
This only needs to include scheme (e.g. |
CollectionId * | An ID (provided from the Upstream API) for this Task API consumer |
Username * | A valid username for accessing the Task API |
Password * | A valid password for the Task API user configured above |
PollingFrequency | Interval in milliseconds between polling requests to the Upstream Task API. Defaults to |
Examples:
UpstreamTaskApi__BaseUrl="https://my-task-api.com"
UpstreamTaskApi__CollectionId="dd52026b-5a61-4c89-b733-04ba141b3f31"
UpstreamTaskApi__Username=user
UpstreamTaskApi__Password=password
UpstreamTaskApi__PollingFrequency=5000
Database Connections
Configuration Section: ConnectionStrings
Key | Description |
---|---|
Default * | An ODBC/ADO.NET style connection string for a PostgreSQL 16 Server, and a database name for Relay to store working state in. |
Configuration Section: Database
Key | Description |
---|---|
ApplyMigrationsOnStartup | Should Relay automatically apply outstanding database migrations at
startup? Defaults to |
Examples:
ConnectionStrings__Default="Server=localhost;Port=5432;Database=hutch-relay;User Id=postgres;Password=postgres"
Database__ApplyMigrationsOnStartup=true
RelayTask Queue
Configuration Section: RelayTaskQueue
Key | Description |
---|---|
ConnectionString * | A connection URL for an AMQP Server |
Examples:
RelayTaskQueue__ConnectionString="amqp://user:password@localhost:5672"
Results Obfuscation
Configuration Section: Obfuscation
Key | Description |
---|---|
LowNumberSuppressionThreshold | A positive number will set the threshold below which Relay will suppress
and return Defaults to |
RoundingTarget | The target nearest number to round up to, e.g. Defaults to |
Examples:
Obfuscation__LowNumberSuppressionThreshold=50
Obfuscation__RoundingTarget=5
ASP.NET Core
Since Relay is an ASP.NET Core application, there are some capabilities of that framework that can be configured in the standard way.
Examples of this include logging levels and hosting configuration (e.g. bind addresses, TLS…).
Please refer to the ASP.NET Core documentation on these topics.