[docs] Explain how to configure a list through env variables

Signed-off-by: Victor Barbu <git.zqk3n@vicb.cc>
This commit is contained in:
Victor Barbu
2024-12-03 19:08:23 +02:00
committed by GitHub
parent e3007cd2bc
commit 1d104a9399

View File

@@ -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.