docs: fix yaml sections format at docs.docker.com

yaml sections in the documentation does not display well on
docs.docker.com. This is due to the syntax highlighting
which uses highlight.js and does not support yaml
currently.
The fix is to remove triple back ticks and indent instead.
We loose yaml syntax highlighting on github, but it displays
an acceptable version on both github and docs.docker.com.

Signed-off-by: Olivier Jacques <olivier.jacques@hp.com>
This commit is contained in:
Olivier Jacques 2015-07-10 23:22:06 +02:00
parent 419bbc2da6
commit b3683863dd
2 changed files with 291 additions and 328 deletions

View file

@ -24,17 +24,13 @@ To override a configuration option, create an environment variable named
and the `_` (underscore) represents indention levels. For example, you can
configure the `rootdirectory` of the `filesystem` storage backend:
```
storage:
filesystem:
rootdirectory: /var/lib/registry
```
To override this value, set an environment variable like this:
```
REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/somewhere
```
This variable overrides the `/var/lib/registry` value to the `/somewhere`
directory.
@ -53,7 +49,6 @@ This section lists all the registry configuration options. Some options in
the list are mutually exclusive. So, make sure to read the detailed reference
information about each option that appears later in this page.
```yaml
version: 0.1
log:
level: debug
@ -174,7 +169,6 @@ redis:
maxidle: 16
maxactive: 64
idletimeout: 300s
```
In some instances a configuration option is **optional** but it contains child
options marked as **required**. This indicates that you can omit the parent with
@ -185,9 +179,7 @@ the children marked **required**.
## version
```yaml
version: 0.1
```
The `version` option is **required**. It specifies the configuration's version.
It is expected to remain a top-level field, to allow for a consistent version
@ -199,14 +191,12 @@ The `log` subsection configures the behavior of the logging system. The logging
system outputs everything to stdout. You can adjust the granularity and format
with this configuration section.
```yaml
log:
level: debug
formatter: text
fields:
service: registry
environment: staging
```
<table>
<tr>
@ -256,8 +246,6 @@ log:
## hooks
```yaml
hooks:
- type: mail
levels:
@ -271,7 +259,6 @@ hooks:
from: name@sendhost.com
to:
- name@receivehost.com
```
The `hooks` subsection configures the logging hooks' behavior. This subsection
includes a sequence handler which you can use for sending mail, for example.
@ -281,16 +268,13 @@ Refer to `loglevel` to configure the level of messages printed.
> **DEPRECATED:** Please use [log](#logs) instead.
```yaml
loglevel: debug
```
Permitted values are `error`, `warn`, `info` and `debug`. The default is
`info`.
## storage
```yaml
storage:
filesystem:
rootdirectory: /var/lib/registry
@ -320,7 +304,6 @@ storage:
age: 168h
interval: 24h
dryrun: false
```
The storage option is **required** and defines which storage backend is in use.
You must configure one backend; if you configure more, the registry returns an error.
@ -599,7 +582,6 @@ Note: `age` and `interval` are strings containing a number with optional fractio
## auth
```yaml
auth:
silly:
realm: silly-realm
@ -612,7 +594,6 @@ auth:
htpasswd:
realm: basic-realm
path: /path/to/htpasswd
```
The `auth` option is **optional**. There are
currently 2 possible auth providers, `silly` and `token`. You can configure only
@ -777,7 +758,6 @@ object they're wrapping. This means a registry middleware must implement the
Currently only one middleware, `cloudfront`, a storage middleware, is supported
in the registry implementation.
```yaml
middleware:
registry:
- name: ARegistryMiddleware
@ -794,7 +774,6 @@ middleware:
privatekey: /path/to/pem
keypairid: cloudfrontkeypairid
duration: 3000
```
Each middleware entry has `name` and `options` entries. The `name` must
correspond to the name under which the middleware registers itself. The
@ -861,7 +840,6 @@ interpretation of the options.
## reporting
```yaml
reporting:
bugsnag:
apikey: bugsnagapikey
@ -871,7 +849,6 @@ reporting:
licensekey: newreliclicensekey
name: newrelicname
verbose: true
```
The `reporting` option is **optional** and configures error and metrics
reporting tools. At the moment only two services are supported, [New
@ -969,7 +946,6 @@ configuration may contain both.
## http
```yaml
http:
addr: localhost:5000
net: tcp
@ -983,7 +959,6 @@ http:
- /path/to/another/ca.pem
debug:
addr: localhost:5001
```
The `http` option details the configuration for the HTTP server that hosts the registry.
@ -1109,7 +1084,6 @@ specifies the `HOST:PORT` on which the debug server should accept connections.
## notifications
```yaml
notifications:
endpoints:
- name: alistener
@ -1119,7 +1093,6 @@ notifications:
timeout: 500
threshold: 5
backoff: 1000
```
The notifications option is **optional** and currently may contain a single
option, `endpoints`.
@ -1237,7 +1210,6 @@ The URL to which events should be published.
## redis
```yaml
redis:
addr: localhost:6379
password: asecret
@ -1249,7 +1221,6 @@ redis:
maxidle: 16
maxactive: 64
idletimeout: 300s
```
Declare parameters for constructing the redis connections. Registry instances
may use the Redis instance for several applications. The current purpose is
@ -1334,12 +1305,10 @@ with the [pool](#pool) subsection.
### pool
```yaml
pool:
maxidle: 16
maxactive: 64
idletimeout: 300s
```
Configure the behavior of the Redis connection pool.
@ -1391,7 +1360,6 @@ Configure the behavior of the Redis connection pool.
The following is a simple example you can use for local development:
```yaml
version: 0.1
log:
level: debug
@ -1403,7 +1371,6 @@ http:
secret: asecretforlocaldevelopment
debug:
addr: localhost:5001
```
The above configures the registry instance to run on port `5000`, binding to
`localhost`, with the `debug` server enabled. Registry data storage is in the
@ -1454,7 +1421,6 @@ conjunction with the S3 storage driver.
The following example illustrates these values:
```
middleware:
storage:
- name: cloudfront
@ -1464,7 +1430,6 @@ middleware:
privatekey: /path/to/asecret.pem
keypairid: asecret
duration: 60
```
>**Note**: Cloudfront keys exist separately to other AWS keys. See

View file

@ -36,7 +36,6 @@ order is not guaranteed.
To setup a registry instance to send notifications to endpoints, one must add
them to the configuration. A simple example follows:
```yaml
notifications:
endpoints:
- name: alistener
@ -46,7 +45,6 @@ notifications:
timeout: 500ms
threshold: 5
backoff: 1s
```
The above would configure the registry with an endpoint to send events to
`https://mylistener.example.com/event`, with the header "Authorization: Bearer