integration - continue work on storageless config for k8s and swarm

This commit is contained in:
florian
2021-09-03 22:40:37 +02:00
parent e55dff8128
commit 062fa3e78a
12 changed files with 100 additions and 107 deletions

View File

@@ -6,7 +6,7 @@ class CertbotNew(Job) :
def __init__(self, redis_host=None, copy_cache=False, domain="", email="", staging=False) :
name = "certbot-new"
data = ["certbot", "certonly", "--webroot", "-w", "/opt/bunkerized-nginx/acme-challenge", "-n", "-d", domain, "--email", email, "--agree-tos"]
data = ["certbot", "certonly", "--manual", "--preferred-challenges=http", "--manual-auth-hook", "/opt/bunkerized-nginx/jobs/certbot-auth.sh", "--manual-cleanup-hook", "/opt/bunkerized-nginx/jobs/certbot-cleanup.sh", "-n", "-d", domain, "--email", email, "--agree-tos"]
if staging :
data.append("--staging")
type = "exec"

3
jobs/certbot-auth.sh Normal file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
echo $CERTBOT_VALIDATION > /opt/bunkerized-nginx/acme-challenge/.well-known/acme-challenge/$CERTBOT_TOKEN

3
jobs/certbot-cleanup.sh Normal file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
rm -f /opt/bunkerized-nginx/acme-challenge/.well-known/acme-challenge/$CERTBOT_TOKEN