diff options
author | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2017-04-03 16:56:11 +0300 |
---|---|---|
committer | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2017-04-06 01:23:46 +0300 |
commit | 9d83d8cc41002ff314ec652bc06acc5b29bd1ec5 (patch) | |
tree | a75420b8f63bfa5a885a9e7c71460da904608a55 /doc/configuration | |
parent | a0d9b01c43ceb562eac21eaf62ec22903eeded7a (diff) |
Config-file using envconfig and toml
- Add documentation
Diffstat (limited to 'doc/configuration')
-rw-r--r-- | doc/configuration/README.md | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/doc/configuration/README.md b/doc/configuration/README.md index accb1ea54..a4431b53d 100644 --- a/doc/configuration/README.md +++ b/doc/configuration/README.md @@ -43,3 +43,47 @@ Prometheus listener is started. ``` GITALY_PROMETHEUS_LISTEN_ADDR=localhost:9236 ``` + +## Configuration file + +Gitaly also takes a path to a config-file as a command-line argument. + +``` +./gitaly /path/to/config.toml +``` + +*NOTE*: Environment variables currently takes percedence over the configuration +file. But environment variables will be depricated at some point. + +### Format + +```toml +socket_path = "/path/to/gitaly.sock" +listen_addr = ":8081" +prometheus_listen_addr = ":9236" + +[[storage]] +path = "/path/to/storage/repositories" +name = "my_shard" + +# Gitaly may serve from multiple storages +#[[storage]] +#name = "other_storage" +#path = "/path/to/other/repositories" +``` + +#### Explanation + +|name|type|required|notes| +|----|----|--------|-----| +|socket_path|string|see notes|A path which gitaly should open a Unix socket. Required unless listen_addr is set| +|listen_addr|string|see notes|TCP address for Gitaly to listen on (See #GITALY_LISTEN_ADDR). Required unless socket_path is set| +|prometheus_listen_addr|string|no|TCP listen address for Prometheus metrics. If not set, no Prometheus listener is started| +|storage|array|yes|An array of storage shards| + +##### Storage + +|name|type|required|notes| +|----|----|--------|-----| +|path|string|yes|Path to storage shard| +|name|string|yes|Name of storage shard| |