-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtraefik.hcl
65 lines (52 loc) · 1.03 KB
/
traefik.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
job "traefik" {
datacenters = ["dc1"]
group "traefik" {
task "traefik" {
driver = "docker"
config {
image = "traefik:v1.7.14-alpine"
network_mode = "host"
volumes = [
"./local/treafik.toml:/etc/traefik/traefik.toml",
]
}
resources {
cpu = 500
memory = 256
network {
mbits = 1
port "ping" {}
}
}
template {
destination = "local/treafik.toml"
data = <<EOH
defaultEntryPoints = ["http"]
[ping]
entryPoint = "internal"
[api]
entryPoint = "internal"
dashboard = true
[consulCatalog]
exposedByDefault = false
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.internal]
address = ":{{ env "NOMAD_PORT_ping" }}"
EOH
}
service {
name = "traefik"
port = "ping"
check {
name = "alive"
type = "http"
path = "/ping"
interval = "10s"
timeout = "2s"
}
}
}
}
}