Configuration

Settings for dkron can be specified in three ways: Using a config/dkron.json config file, using env variables starting with DKRON_ or using command line arguments.

Command line options

Example

# Dkron example configuration file
{
  "backend": "etcd",
  "backend_machine": "127.0.0.1:2379",
  "advertise_addr": "192.168.50.1",
  "server": false,
  "debug": false,
  "tags": {
    "role": "web",
    "datacenter": "east"
  },
  "keyspace": "dkron",
  "encrypt": "a-valid-key-generated-with-dkron-keygen",
  "join": [
    "10.0.0.1",
    "10.0.0.2",
    "10.0.0.3"
  ],
  "webhook_url": "https://hooks.slack.com/services/XXXXXX/XXXXXXX/XXXXXXXXXXXXXXXXXXXX",
  "webhook_payload": "payload={\"text\": \"{{.Report}}\", \"channel\": \"#foo\"}",
  "webhook_headers": "Content-Type:application/x-www-form-urlencoded",
  "mail_host": "email-smtp.eu-west-1.amazonaws.com",
  "mail_port": 25,
  "mail_username": "mailuser",
  "mail_password": "mailpassword",
  "mail_from": "cron@example.com"
}