Skip to content

Commit

Permalink
feat: updated the readme with the new config file
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-cne committed Jul 30, 2024
1 parent 33240aa commit cd949fb
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

## How to use it?

In order to use the `dnsr` you have to create some configuration files and a folder to store the TSIG keys generated.
In order to use the `dnsr` you have to create a configuration file and a folder to store the TSIG keys generated.

`dnsr` is deployed as a Docker container. You can use the following command to run it:

```bash
docker run -d -p 8053:8053/udp -v ./config.yml:/etc/dnsr/config.yml -v ./domains.yml:/etc/dnsr/domains.yml -v ./keys:/etc/dnsr/keys ghrc.io/thibault-cne/dnsr:latest
docker run -d -p 8053:8053/udp -v ./config.yml:/etc/dnsr/config.yml -v ./keys:/etc/dnsr/keys ghrc.io/thibault-cne/dnsr:latest
```

### Configuration files
Expand All @@ -32,25 +32,22 @@ log:
enable_udp_metrics: true
# Enable the tcp metrics.
enable_tcp_metrics: true
```
#### domains.yml
The `domains.yml` file is used to configure the domains that the `dnsr` server will handle. In the following example, the `dnsr` server will handle the `example1.com`, `example2.com`, and `example3.com` domains:

```yaml
---
domains:
- example1.com
- name: example2.com
- name: example3.com
# The file name of the TSIG key for the domain.
# The file is located in the `tsig_folder` folder.
# This is optional. If not provided, the key file will be named after the domain name in snake case.
tsig_file_name: example3.key
# The keys and domains configuration
keys:
- key1:
- domain1
- domain2
- key2:
- domain3
- domain4
```
**Note:** The `dnsr` server constantly whatches the `domains.yml` file for changes. If the file is modified, the server will reload the domains (e.g. add or remove domains).
In the previous example, the `dnsr` server will handle the domain1, domain2, domain3 and domain4 domains.
The key1 will be used to handle the domain1 and domain2 domains and the key2 will be used to handle the domain3 and domain4 domains.

**Note**: The dnsr server constantly whatches the `config.yml` file for changes.
If the file is modified, the server will reload the domains (e.g. add or remove domains).

### TSIG keys

Expand Down

0 comments on commit cd949fb

Please sign in to comment.