From 07289d827d30adee6afa0f983ae19f27c9554648 Mon Sep 17 00:00:00 2001 From: wizzdom Date: Sun, 29 Dec 2024 17:40:11 +0000 Subject: [PATCH] traefik: add dynamic redirects via consul kv --- jobs/ingress/traefik.hcl | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/jobs/ingress/traefik.hcl b/jobs/ingress/traefik.hcl index c8f34f7..3693f5c 100644 --- a/jobs/ingress/traefik.hcl +++ b/jobs/ingress/traefik.hcl @@ -143,6 +143,10 @@ job "traefik" { address = "127.0.0.1:8500" scheme = "http" +# Enable the file provider for dynamic configuration. +[providers.file] + filename = "/local/dynamic.toml" + #[providers.nomad] # [providers.nomad.endpoint] # address = "127.0.0.1:4646" @@ -160,6 +164,42 @@ job "traefik" { EOF destination = "/local/traefik.toml" } + template { + data = <