25 releases (14 breaking)

new 0.28.1 Jan 10, 2025
0.28.0 Dec 12, 2024
0.27.0 Nov 20, 2024
0.17.0-rc.1 Jul 19, 2024
0.12.0-alpha Mar 18, 2024

#324 in Configuration

Download history 273/week @ 2024-09-14 79/week @ 2024-09-21 92/week @ 2024-09-28 167/week @ 2024-10-05 36/week @ 2024-10-12 5/week @ 2024-10-19 116/week @ 2024-10-26 29/week @ 2024-11-02 2/week @ 2024-11-09 255/week @ 2024-11-16 44/week @ 2024-11-23 13/week @ 2024-11-30 173/week @ 2024-12-07 27/week @ 2024-12-14

201 downloads per month
Used in 2 crates (via opentalk-database)

EUPL-1.2

30KB
738 lines

Contains the application settings.

The application settings are set with a TOML config file. Settings specified in the config file can be overwritten by environment variables. To do so, set an environment variable with the prefix OPENTALK_CTRL_ followed by the field names you want to set. Nested fields are separated by two underscores __.

OPENTALK_CTRL_<field>__<field-of-field>...

Example

set the database.url field:

OPENTALK_CTRL_DATABASE__URL=postgres://postgres:password123@localhost:5432/opentalk

So the field 'database.max_connections' would resolve to:

OPENTALK_CTRL_DATABASE__MAX_CONNECTIONS=5

Note

Fields set via environment variables do not affect the underlying config file.

Implementation Details:

Setting categories, in which all properties implement a default value, should also implement the Default trait.

Dependencies

~42MB
~451K SLoC