Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding DNS-01 option #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
4 changes: 4 additions & 0 deletions updatessl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down