Skip to content

Commit

Permalink
Changelog and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
afflerbach committed Jun 2, 2022
1 parent 5d77acf commit 0ceeb69
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
Unreleased changes are available as `avenga/couper:edge` container.

* **Added**
* Couper [reads and merges configuration files](./docs/CLI.md#global-options) from a given directory ([#437](https://github.com/avenga/couper/pull/437))
* provided via `-d` command-line flag or `COUPER_FILE_DIRECTORY` environment variable
* Couper now [reads and merges multiple configuration files](./docs/CLI.md#global-options) ([#437](https://github.com/avenga/couper/pull/437), [#515](https://github.com/avenga/couper/pull/515))
* `beta_health`-block to `backend`-block to enable continuous health-checks for defined backends ([#313](https://github.com/avenga/couper/pull/313))
* `backends.<name>.health` variable to access the current health-check state _(subject to change)_
* Log malformed duration settings ([#487](https://github.com/avenga/couper/pull/487))
Expand Down
36 changes: 21 additions & 15 deletions docs/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Couper is build as binary called `couper` with the following commands:

| Argument | Default | Environment | Description |
|:---------------------|:-------------|:---------------------------|:-----------------------------------------------------------------------------------------------------------------------------|
| `-f` | `couper.hcl` | `COUPER_FILE` | File path to your Couper configuration file. |
| `-d` | - | `COUPER_FILE_DIRECTORY` | Path to your Couper configuration files directory. |
| `-f` | `couper.hcl` | `COUPER_FILE` | Path to a Couper configuration file. |
| `-d` | - | `COUPER_FILE_DIRECTORY` | Path to a directory containing Couper configuration files. |
| `-watch` | `false` | `COUPER_WATCH` | Watch for configuration file changes and reload on modifications. |
| `-watch-retries` | `5` | `COUPER_WATCH_RETRIES` | Maximum retry count for configuration reloads which could not bind the configured port. |
| `-watch-retry-delay` | `500ms` | `COUPER_WATCH_RETRY_DELAY` | Delay duration before next attempt if an error occurs. |
Expand All @@ -30,22 +30,28 @@ Couper is build as binary called `couper` with the following commands:

**Note:** `log-format`, `log-level` and `log-pretty` also map to [settings](REFERENCE.md#settings-block).

**Note:** Couper can be started with both, `-f` and `-d` arguments. The path of `-f <file>`
determines the working directory of Couper. If `-d <dir>` argument is given without the `-f <file>`,
the path of `-d <dir>` is the working directory of Couper. A `couper.hcl` file inside the
`-d <dir>` is priorized over other files inside the `-d <dir>`, but not over the
`-f <file>`. Other files in the `-d <dir>` are loaded in alphabetical order. Example:
**Note:** Couper can be started with multiple `-f <file>` and `-d <dir>` arguments.
Files in the `-d <dir>` are loaded in alphabetical order. Blocks and attributes
defined in later files may override those defined earlier. See [Merging](MERGE.md) for details.

**Example:**

```sh
|- couper.hcl # defined via `-f`
|- couper.d/ # defined via `-d`
| |- couper.hcl # step 3: merge configuration into the couper.hcl defined via `-f`
| |- a.hcl # step 2: merge configuration into the couper.d/couper.hcl
| |- z.hcl # step 1: merge configuration into the couper.d/a.hcl
```
$ tree
.
├── conf
│   ├── a.hcl
│   ├── b.hcl
│   └── c.hcl
├── devel.hcl
└── global.hcl

**Note:** When merging configuration files, only one unlabeled `server` or `api` block
is allowed in each context.
1 directory, 5 files

$ couper run -f global.hcl -d conf/ -f devel.hcl -log-level=debug
DEBU[0000] loaded files … […/global.hcl …/conf/a.hcl …/conf/b.hcl …/conf/c.hcl …/devel.hcl] …
```

## Run Options

Expand Down

0 comments on commit 0ceeb69

Please sign in to comment.