From fa756c4810c932e3a45e014d6a0310fee46a6b9b Mon Sep 17 00:00:00 2001 From: Nicolas Carlier Date: Fri, 6 Jul 2018 14:08:51 +0000 Subject: [PATCH] doc(): add configutration section --- README.md | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f24d70c..2fabb94 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,38 @@ $ docker run -d --name=webhookd \ ncarlier/webhookd ``` -Check the provided environment file [.env](.env) for details. +Check the provided environment file [.env](.env) for configuration details. > Note that this image extends `docker:dind` Docker image. Therefore you are > able to interact with a Docker daemon with yours shell scripts. +## Configuration + +You can configure the daemon by: + +### Setting environment variables: + +| Variable | Default | Description | +|----------|---------|-------------| +| `APP_HOOK_TIMEOUT` | `10` | Hook maximum delay before timeout (in second) | +| `APP_SCRIPTS_DIR` | `./scripts` | Scripts directory | +| `APP_SCRIPTS_GIT_URL` | none | GIT repository that contains scripts (Note: this is only used by the Docker image or by using the Docker entrypoint script) | +| `APP_SCRIPTS_GIT_KEY` | none | GIT SSH private key used to clone the repository (Note: this is only used by the Docker image or by using the Docker entrypoint script) | +| `APP_WORKING_DIR` | `/tmp` (OS temp dir) | Working directory (to store execution logs) | +| `APP_NOTIFIER` | none | Post script notification (`http` or `smtp`) | +| `APP_NOTIFIER_FROM` | none | Sender of the notification | +| `APP_NOTIFIER_TO` | none | Recipient of the notification | +| `APP_HTTP_NOTIFIER_URL` | none | URL of the HTTP notifier | +| `APP_SMTP_NOTIFIER_HOST` | none | Hostname of the SMTP relay | + +### Using command parameters: + +| Parameter | Default | Description | +|----------|---------|-------------| +| `-l
` | `:8080` | HTTP service address | +| `-n ` | `2` | The number of workers to start | +| `-d` | false | Output debug logs | + ## Usage ### Directory structure