-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathtraefik.nomad.hcl
75 lines (61 loc) · 1.29 KB
/
traefik.nomad.hcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
job "traefik" {
region = "global"
datacenters = ["eu-west-2a","eu-west-2b","eu-west-2c","eu-west-2","dc1"]
type = "system"
group "traefik" {
count = 1
network {
mode = "host"
port "http" {
static = 8080
}
port "api" {
static = 8081
}
}
task "traefik" {
driver = "docker"
config {
image = "traefik"
network_mode = "host"
volumes = [
"local/traefik.toml:/etc/traefik/traefik.toml",
]
}
template {
data = <<EOF
[entryPoints]
[entryPoints.http]
address = ":8080"
[entryPoints.traefik]
address = ":8081"
[ping]
entryPoint = "traefik"
[api]
dashboard = true
insecure = true
debug = true
# Enable Consul Catalog configuration backend.
[providers.consulCatalog]
prefix = "traefik"
exposedByDefault = false
[providers.consulCatalog.endpoint]
address = "http://127.0.0.1:8500"
scheme = "http"
EOF
destination = "local/traefik.toml"
}
service {
name = "traefik"
port = "http"
check {
type = "http"
port = "api"
path = "/ping"
interval = "10s"
timeout = "2s"
}
}
}
}
}