traefik: use consul, bump res, add metrics, fix dummy service
This commit is contained in:
parent
814655cc5f
commit
9cc57a2ed8
1 changed files with 11 additions and 3 deletions
|
@ -51,7 +51,7 @@ job "traefik" {
|
||||||
|
|
||||||
service {
|
service {
|
||||||
name = "traefik-http"
|
name = "traefik-http"
|
||||||
provider = "nomad"
|
provider = "consul"
|
||||||
port = "https"
|
port = "https"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,6 +67,10 @@ job "traefik" {
|
||||||
"/storage/nomad/traefik/access.log:/access.log",
|
"/storage/nomad/traefik/access.log:/access.log",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
resources {
|
||||||
|
cpu = 500
|
||||||
|
memory = 1024
|
||||||
|
}
|
||||||
|
|
||||||
template {
|
template {
|
||||||
data = <<EOF
|
data = <<EOF
|
||||||
|
@ -157,7 +161,11 @@ job "traefik" {
|
||||||
storage = "acme.json"
|
storage = "acme.json"
|
||||||
[certificatesResolvers.lets-encrypt.acme.tlsChallenge]
|
[certificatesResolvers.lets-encrypt.acme.tlsChallenge]
|
||||||
|
|
||||||
[tracing]
|
[metrics]
|
||||||
|
[metrics.prometheus]
|
||||||
|
addServicesLabels = true
|
||||||
|
addRoutersLabels = true
|
||||||
|
addEntryPointsLabels = true
|
||||||
|
|
||||||
[accessLog]
|
[accessLog]
|
||||||
filePath = "/access.log"
|
filePath = "/access.log"
|
||||||
|
@ -195,7 +203,7 @@ EOF
|
||||||
[http.services]
|
[http.services]
|
||||||
[http.services.dummy-service.loadBalancer]
|
[http.services.dummy-service.loadBalancer]
|
||||||
[[http.services.dummy-service.loadBalancer.servers]]
|
[[http.services.dummy-service.loadBalancer.servers]]
|
||||||
url = "http://127.0.0.1" # Dummy service - not used
|
url = "http://0.0.0.0" # Dummy service - not used
|
||||||
EOF
|
EOF
|
||||||
destination = "local/dynamic.toml"
|
destination = "local/dynamic.toml"
|
||||||
change_mode = "noop"
|
change_mode = "noop"
|
||||||
|
|
Loading…
Reference in a new issue