2017-08-26 10:12:44 +00:00
|
|
|
# DynamoDB Backend
|
2017-08-25 19:32:33 +00:00
|
|
|
|
2017-09-11 17:10:04 +00:00
|
|
|
Træfik can be configured to use Amazon DynamoDB as a backend configuration.
|
|
|
|
|
|
|
|
## Configuration
|
2017-08-25 19:32:33 +00:00
|
|
|
|
|
|
|
```toml
|
|
|
|
################################################################
|
|
|
|
# DynamoDB configuration backend
|
|
|
|
################################################################
|
|
|
|
|
2017-09-11 17:10:04 +00:00
|
|
|
# Enable DynamoDB configuration backend.
|
2017-08-25 19:32:33 +00:00
|
|
|
[dynamodb]
|
|
|
|
|
2017-09-11 17:10:04 +00:00
|
|
|
# Region to use when connecting to AWS.
|
2017-08-25 19:32:33 +00:00
|
|
|
#
|
2017-09-11 17:10:04 +00:00
|
|
|
# Required
|
2017-08-25 19:32:33 +00:00
|
|
|
#
|
2017-09-11 17:10:04 +00:00
|
|
|
region = "us-west-1"
|
2017-08-25 19:32:33 +00:00
|
|
|
|
2017-09-11 17:10:04 +00:00
|
|
|
# DyanmoDB Table Name.
|
2017-08-25 19:32:33 +00:00
|
|
|
#
|
|
|
|
# Optional
|
2017-09-11 17:10:04 +00:00
|
|
|
# Default: "traefik"
|
2017-08-25 19:32:33 +00:00
|
|
|
#
|
2017-09-11 17:10:04 +00:00
|
|
|
tableName = "traefik"
|
2017-08-25 19:32:33 +00:00
|
|
|
|
2017-09-11 17:10:04 +00:00
|
|
|
# Enable watch DynamoDB changes.
|
2017-08-25 19:32:33 +00:00
|
|
|
#
|
|
|
|
# Optional
|
2017-09-11 17:10:04 +00:00
|
|
|
# Default: true
|
2017-08-25 19:32:33 +00:00
|
|
|
#
|
2017-09-11 17:10:04 +00:00
|
|
|
watch = true
|
2017-08-25 19:32:33 +00:00
|
|
|
|
2017-09-11 17:10:04 +00:00
|
|
|
# Polling interval (in seconds).
|
2017-08-25 19:32:33 +00:00
|
|
|
#
|
2017-09-11 17:10:04 +00:00
|
|
|
# Optional
|
|
|
|
# Default: 15
|
2017-08-25 19:32:33 +00:00
|
|
|
#
|
2017-09-11 17:10:04 +00:00
|
|
|
refreshSeconds = 15
|
2017-08-25 19:32:33 +00:00
|
|
|
|
2017-09-11 17:10:04 +00:00
|
|
|
# AccessKeyID to use when connecting to AWS.
|
2017-08-25 19:32:33 +00:00
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
2017-09-11 17:10:04 +00:00
|
|
|
accessKeyID = "abc"
|
2017-08-25 19:32:33 +00:00
|
|
|
|
2017-09-11 17:10:04 +00:00
|
|
|
# SecretAccessKey to use when connecting to AWS.
|
2017-08-25 19:32:33 +00:00
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
2017-09-11 17:10:04 +00:00
|
|
|
secretAccessKey = "123"
|
2017-08-25 19:32:33 +00:00
|
|
|
|
2017-09-11 17:10:04 +00:00
|
|
|
# Endpoint of local dynamodb instance for testing?
|
2017-08-25 19:32:33 +00:00
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
2017-09-11 17:10:04 +00:00
|
|
|
endpoint = "http://localhost:8080"
|
2017-08-25 19:32:33 +00:00
|
|
|
```
|
|
|
|
|
2017-09-11 17:10:04 +00:00
|
|
|
## Table Items
|
|
|
|
|
2017-09-07 10:02:03 +00:00
|
|
|
Items in the `dynamodb` table must have three attributes:
|
2017-08-25 19:32:33 +00:00
|
|
|
|
2017-08-26 10:12:44 +00:00
|
|
|
- `id` (string): The id is the primary key.
|
|
|
|
- `name`(string): The name is used as the name of the frontend or backend.
|
2017-09-11 17:10:04 +00:00
|
|
|
- `frontend` or `backend` (map): This attribute's structure matches exactly the structure of a Frontend or Backend type in Traefik.
|
2017-09-05 13:58:03 +00:00
|
|
|
See `types/types.go` for details.
|
2017-08-26 10:12:44 +00:00
|
|
|
The presence or absence of this attribute determines its type.
|
|
|
|
So an item should never have both a `frontend` and a `backend` attribute.
|
2017-09-11 17:10:04 +00:00
|
|
|
|