26 releases (14 breaking)

0.28.2 Jan 28, 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

#312 in Configuration

Download history 4/week @ 2024-10-20 126/week @ 2024-10-27 19/week @ 2024-11-03 2/week @ 2024-11-10 273/week @ 2024-11-17 28/week @ 2024-11-24 12/week @ 2024-12-01 183/week @ 2024-12-08 16/week @ 2024-12-15 115/week @ 2025-01-05 27/week @ 2025-01-12 3/week @ 2025-01-19 101/week @ 2025-01-26 20/week @ 2025-02-02

184 downloads per month
Used in opentalk-database

EUPL-1.2

31KB
754 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
~454K SLoC