|
|
@@ -384,9 +384,14 @@ files.
|
|
384
|
384
|
|
|
385
|
385
|
### Prepare a configuration file
|
|
386
|
386
|
|
|
387
|
|
-Please checkout an example configuration file. All options except of
|
|
388
|
|
-`secret` and `bind-to` are optional. You can safely have this minimal
|
|
389
|
|
-configuration file:
|
|
|
387
|
+mtg is configured via a [TOML](https://toml.io/en/) file. The full
|
|
|
388
|
+reference is [`example.config.toml`](./example.config.toml) in this
|
|
|
389
|
+repository — every option is listed there with its default value and
|
|
|
390
|
+an inline comment explaining what it does. Treat that file as the
|
|
|
391
|
+configuration documentation.
|
|
|
392
|
+
|
|
|
393
|
+All options except `secret` and `bind-to` are optional, so the minimal
|
|
|
394
|
+working configuration is:
|
|
390
|
395
|
|
|
391
|
396
|
```toml
|
|
392
|
397
|
secret = "ee473ce5d4958eb5f968c87680a23854a0676f6f676c652e636f6d"
|
|
|
@@ -396,8 +401,6 @@ bind-to = "0.0.0.0:443"
|
|
396
|
401
|
This is enough to run the whole application. All other
|
|
397
|
402
|
options already have sensible defaults for the app at almost any scale.
|
|
398
|
403
|
|
|
399
|
|
-Oh, the configuration is done in [TOML format](https://toml.io/en/).
|
|
400
|
|
-
|
|
401
|
404
|
### Run a proxy
|
|
402
|
405
|
|
|
403
|
406
|
Put a binary and a config into your webserver. Just for example,
|
|
|
@@ -467,8 +470,8 @@ $ docker exec mtg-proxy /mtg access /config.toml
|
|
467
|
470
|
|
|
468
|
471
|
## Doppelganger
|
|
469
|
472
|
|
|
470
|
|
-mtg can mimic real websites, please take a look at relevant section in example
|
|
471
|
|
-config file.
|
|
|
473
|
+mtg can mimic real websites — see the `[defense.doppelganger]` section
|
|
|
474
|
+in [`example.config.toml`](./example.config.toml).
|
|
472
|
475
|
|
|
473
|
476
|
mtg comes with some very good precollected statistics coming from
|
|
474
|
477
|
[ok.ru](https://ok.ru/). It does not mean that you have to cover yourself
|
|
|
@@ -562,8 +565,9 @@ There are three ways to resolve it:
|
|
562
|
565
|
|
|
563
|
566
|
Out of the box, mtg works with
|
|
564
|
567
|
[statsd](https://github.com/statsd/statsd) and
|
|
565
|
|
-[Prometheus](https://prometheus.io/). Please check configuration file
|
|
566
|
|
-example to get how to set this integration up.
|
|
|
568
|
+[Prometheus](https://prometheus.io/). See the `[stats.statsd]` and
|
|
|
569
|
+`[stats.prometheus]` sections in
|
|
|
570
|
+[`example.config.toml`](./example.config.toml) for setup.
|
|
567
|
571
|
|
|
568
|
572
|
Here goes a list of metrics with their types but without a prefix.
|
|
569
|
573
|
|