diff --git a/CHANGELOG.md b/CHANGELOG.md index 32a6cdb..4d79aca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ -# 4.3.0 +# 4.4.0 ++ Remove force renew from Docker ++ Set force renew as environment variable + +## 4.3.0 + Remove Docker implementation (not completed) + Remove config folder (for old Docker) + Add Dockerfile 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 57ea73c..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' -x \ 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