From 0e76f6dff90c745f684a93a59829a99f1e8fc9d3 Mon Sep 17 00:00:00 2001 From: Min RK Date: Tue, 16 May 2023 13:11:04 +0200 Subject: [PATCH] support letsencrypt staging server for easier testing --- tljh/configurer.py | 1 + tljh/traefik.toml.tpl | 3 +++ 2 files changed, 4 insertions(+) diff --git a/tljh/configurer.py b/tljh/configurer.py index c5ddf18..8e49d75 100644 --- a/tljh/configurer.py +++ b/tljh/configurer.py @@ -40,6 +40,7 @@ default = { "letsencrypt": { "email": "", "domains": [], + "staging": False, }, }, "traefik_api": { diff --git a/tljh/traefik.toml.tpl b/tljh/traefik.toml.tpl index 0c4ac8c..e1f82a1 100644 --- a/tljh/traefik.toml.tpl +++ b/tljh/traefik.toml.tpl @@ -47,6 +47,9 @@ X-Xsrftoken = "redact" [certificatesResolvers.letsencrypt.acme] email = "{{ https['letsencrypt']['email'] }}" storage = "acme.json" +{% if https['letsencrypt']['staging'] -%} +caServer = "https://acme-staging-v02.api.letsencrypt.org/directory" +{%- endif %} [certificatesResolvers.letsencrypt.acme.tlsChallenge] {% endif %}