Tell traefik to load new certs

This commit is contained in:
IamTheFij 2025-02-24 10:15:05 -08:00
parent 46fac59c3d
commit f1497096e6

View File

@ -283,11 +283,30 @@ EOF
change_mode = "noop"
}
template {
data = <<EOF
{{- with nomadVar "secrets/certs/_lego/certificates/__iamthefij_com_crt" }}{{ .contents }}{{ end -}}"
EOF
destination = "${NOMAD_SECRETS_DIR}/certs/_.iamthefij.com.crt"
change_mode = "noop"
}
template {
data = <<EOF
{{- with nomadVar "secrets/certs/_lego/certificates/__iamthefij_com_key" }}{{ .contents }}{{ end -}}"
EOF
destination = "${NOMAD_SECRETS_DIR}/certs/_.iamthefij.com.key"
change_mode = "noop"
}
template {
data = <<EOH
[[tls.certificates]]
certFile = "/etc/traefik/certs/_.thefij.rocks.crt"
keyFile = "/etc/traefik/certs/_.thefij.rocks.key"
[[tls.certificates]]
certFile = "/etc/traefik/certs/_.iamthefij.com.crt"
keyFile = "/etc/traefik/certs/_.iamthefij.com.key"
EOH
destination = "${NOMAD_TASK_DIR}/config/conf/dynamic-tls.toml"
change_mode = "noop"