From fd29c52ba913489af41ed09827ae778edc9ae5e8 Mon Sep 17 00:00:00 2001 From: Mathieu Dugas Date: Sun, 6 Feb 2022 23:07:52 -0500 Subject: [PATCH 1/2] Adding DNS-01 option --- updatessl.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/updatessl.sh b/updatessl.sh index 1f40e4c..b061eb2 100644 --- a/updatessl.sh +++ b/updatessl.sh @@ -3,6 +3,10 @@ _SCRIPT_="$0" ACME_BIN="/acme.sh/acme.sh --home /acme.sh --config-home /acmecerts" +if test "$ACME_DNS" = 'true' ; then + echo "enabling dns mode" + ACME_BIN="$ACME_BIN --dns $DNS_HOOK" +fi DEFAULT_CONF="/etc/nginx/conf.d/default.conf" From 9d0ecd6b2bba36dbd8198b82d311137967198ae2 Mon Sep 17 00:00:00 2001 From: Mathieu Dugas Date: Sun, 6 Feb 2022 23:37:31 -0500 Subject: [PATCH 2/2] Adding new variables in README file --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 64a8f9c..2a43426 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ Based on https://github.com/nginx-proxy/nginx-proxy -A new env varaible `ENABLE_ACME` is added to use acme.sh to generate free ssl cert from letsencrypt. +A few new env variables are added to use acme.sh to generate free ssl cert from letsencrypt. +- `ENABLE_ACME` => Set to `true` on other containers to enable certificate generation +- `ACME_DNS` => Set to `true` on this container to enable DNS-01 challenge +- `DNS_HOOK` => Set to one of the DNS hook script from the acme.sh script. This also adds the various environment variables used by the hook script specified. ie: `AD_API_KEY` for the dns_ad hook. + All the other options are the same as the upstream project. It's very easy to use: