From afb626e823bc6bf1889c018477f0f84cb68288d0 Mon Sep 17 00:00:00 2001 From: Ryc O'Chet Date: Tue, 3 Mar 2026 10:23:35 +0000 Subject: [PATCH] Test for tabbed configuration --- .../docs/docs/reference/configuration.mdx | 73 +++++++++++++++++-- 1 file changed, 66 insertions(+), 7 deletions(-) diff --git a/src/content/docs/docs/reference/configuration.mdx b/src/content/docs/docs/reference/configuration.mdx index 6669ce7..b434eec 100644 --- a/src/content/docs/docs/reference/configuration.mdx +++ b/src/content/docs/docs/reference/configuration.mdx @@ -3,7 +3,9 @@ title: Configuration description: Reference on Tinyauth's configuration. --- -Tinyauth can be configured using environment variables or CLI flags. The table below provides a comprehensive list of configuration options. +Tinyauth can be configured using environment variables, CLI flags, or (experimental) YAML config file. The table below provides a comprehensive list of configuration options. + +When the same option is passed in multiple ways, the order of precedence is `YAML > CLI > ENV`. :::note Configuration options with a `FILE_` equivalent (e.g., `USERS` and @@ -11,17 +13,74 @@ Tinyauth can be configured using environment variables or CLI flags. The table b an alternative. ::: + + + All environment variables are in **UPPER CASE**, and are prefixed by `TINYAUTH_`. The parts are separated by undescores (`_`). + + + All flags are in **lower case**. The parts are separated by dots (`.`). + + + YAML configuration is **camelCase**. The parts are nested in standard YAML format. + + You must pass the config file name with a CLI argument `--experimental.configfile=myconfig.yaml` + + + + + + | Environment | Description | Default | + | - | - | - | + + + | Flag | Description | Default | + | - | - | - | + + + | YAML | Description | Default | + | - | - | - | + + + ## General Configuration -| Environment | Flag | Description | Default | -| - | - | - | - | -| `TINYAUTH_APPURL` | `--appurl` | The base URL where the app is hosted. | `` | + + + | Environment | Description | Default | + | - | - | - | + | `TINYAUTH_APPURL` | The base URL where the app is hosted. | `` | + + + | Flag | Description | Default | + | - | - | - | + | `--appurl` | The base URL where the app is hosted. | `` | + + + | YAML | Description | Default | + | - | - | - | + | `appUrl` | The base URL where the app is hosted. | `` | + + ## Database Configuration -| Environment | Flag | Description | Default | -| - | - | - | - | -| `TINYAUTH_DATABASE_PATH` | `--database.path` | The path to the database, including file name. | `./tinyauth.db` | + + + | Environment | Description | Default | + | - | - | - | + | `TINYAUTH_DATABASE_PATH` |The path to the database, including file name. | `./tinyauth.db` | + + + | Flag | Description | Default | + | - | - | - | + |`--database.path` | The path to the database, including file name. | `./tinyauth.db` | + + + | YAML | Description | Default | + | - | - | - | + | database:
path
| The path to the database, including file name. | `./tinyauth.db` | +
+
## Analytics Configuration