From 1d104a93991d71a14e3342bae7481032ff222d61 Mon Sep 17 00:00:00 2001 From: Victor Barbu Date: Tue, 3 Dec 2024 19:08:23 +0200 Subject: [PATCH] [docs] Explain how to configure a list through env variables Signed-off-by: Victor Barbu --- docs/content/about/configuration.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/content/about/configuration.md b/docs/content/about/configuration.md index afebe52a2..1040de428 100644 --- a/docs/content/about/configuration.md +++ b/docs/content/about/configuration.md @@ -35,6 +35,23 @@ REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/somewhere This variable overrides the `/var/lib/registry` value to the `/somewhere` directory. +In order to override elements of a list, provide the index of the element +you wish to change as part of the path to that element. For example, to +configure the `hosts` list under `letsencrypt`: + +```yaml +http: + tls: + letsencrypt: + hosts: [myregistryaddress.org] +``` + +The corresponding environment variable would be: + +```sh +REGISTRY_HTTP_TLS_LETSENCRYPT_HOSTS_0=registry.example.com +``` + > **Note**: Create a base configuration file with environment variables that can > be configured to tweak individual values. Overriding configuration sections > with environment variables is not recommended.