From 78cc54492b65afb1c68d889893c974cb1758c227 Mon Sep 17 00:00:00 2001 From: sineverba Date: Thu, 4 Feb 2021 19:32:28 +0100 Subject: [PATCH 1/3] Add force renew --- CHANGELOG.md | 5 ++++- docker/docker-entrypoint.sh | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32a6cdb..8aea652 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ -# 4.3.0 +# Next version ++ Remove force renew from Docker + +## 4.3.0 + Remove Docker implementation (not completed) + Remove config folder (for old Docker) + Add Dockerfile diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 57ea73c..08f214c 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -35,4 +35,4 @@ if [ ! -d "$ACCOUNTS_DIR" ]; then ./app/dehydrated/dehydrated --register --accept-terms exit fi -./app/dehydrated/dehydrated -c -t dns-01 -k '/app/dehydrated/hook.sh' -x \ No newline at end of file +./app/dehydrated/dehydrated -c -t dns-01 -k '/app/dehydrated/hook.sh' \ No newline at end of file From 28420b9150dadd9af8c894a963b3b15b261b616d Mon Sep 17 00:00:00 2001 From: sineverba Date: Thu, 4 Feb 2021 21:34:24 +0100 Subject: [PATCH 2/3] Add environment variable --- CHANGELOG.md | 1 + README.md | 10 +++++++++- docker/dehydrated/config | 2 +- docker/docker-entrypoint.sh | 9 ++++++++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8aea652..70b0578 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Next version + Remove force renew from Docker ++ Set force renew as environment variable ## 4.3.0 + Remove Docker implementation (not completed) diff --git a/README.md b/README.md index dffdcb4..eb35b25 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ Inspired by ## Docker version + Pull from Docker Hub: `docker pull sineverba/cfhookbash` -+ Make a first run, it will create the correct directories and files: ++ Make a first run, it will auto-register and will create the correct directories and files: ```shell $ docker run -it --rm -v $(pwd)/data:/app/dehydrated --name cfhookbash sineverba/cfhookbash:latest @@ -151,3 +151,11 @@ $ docker run -it --rm -v $(pwd)/data:/app/dehydrated --name cfhookbash sineverba $ docker run -it --rm -v $(pwd)/data:/app/dehydrated --name cfhookbash sineverba/cfhookbash:latest ``` ++ To force renew, pass the `ENV VAR` `FORCE_RENEW=TRUE` (caps lock for TRUE) + +```shell +$ docker run -it --rm -v $(pwd)/data:/app/dehydrated -e FORCE_RENEW=TRUE --name cfhookbash sineverba/cfhookbash:latest +``` + ++ If you launch docker with stage url, removing it LE blocks you, requesting to re-register. Simply delete the `data/accounts` folder and relaunch (2 times) the docker. + diff --git a/docker/dehydrated/config b/docker/dehydrated/config index 24869b5..82efc90 100644 --- a/docker/dehydrated/config +++ b/docker/dehydrated/config @@ -1 +1 @@ -CA="https://acme-staging-v02.api.letsencrypt.org/directory" \ No newline at end of file +#CA="https://acme-staging-v02.api.letsencrypt.org/directory" \ No newline at end of file diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 08f214c..0158926 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -35,4 +35,11 @@ if [ ! -d "$ACCOUNTS_DIR" ]; then ./app/dehydrated/dehydrated --register --accept-terms exit fi -./app/dehydrated/dehydrated -c -t dns-01 -k '/app/dehydrated/hook.sh' \ No newline at end of file + +RENEW_OPT= +if [ "$FORCE_RENEW" == TRUE ]; then + RENEW_OPT=-x +fi +./app/dehydrated/dehydrated -c -t dns-01 -k '/app/dehydrated/hook.sh' $RENEW_OPT + +exec "$@" \ No newline at end of file From e7c02ee66bfaf1bc723537c78c27718e448f80c9 Mon Sep 17 00:00:00 2001 From: sineverba Date: Thu, 4 Feb 2021 21:36:46 +0100 Subject: [PATCH 3/3] Release 4.4.0 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70b0578..4d79aca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# Next version +# 4.4.0 + Remove force renew from Docker + Set force renew as environment variable