add optional e-mail
This commit is contained in:
@@ -7,6 +7,7 @@ services:
|
||||
image: bitdeals/certbot
|
||||
environment:
|
||||
- DOMAIN=
|
||||
- EMAIL=
|
||||
volumes:
|
||||
- certificates:/etc/certificates
|
||||
- letsencrypt:/etc/letsencrypt
|
||||
|
||||
@@ -10,13 +10,19 @@ if [ ! -f /etc/certificates/site.pem ]; then
|
||||
cat site.key site.crt >> /etc/certificates/site.pem
|
||||
fi
|
||||
|
||||
# check e-mail for letsencrypt notifications
|
||||
if [ -n "$EMAIL" ]; then
|
||||
CERTBOT_OPTS="--email $EMAIL"
|
||||
else
|
||||
CERTBOT_OPTS="--register-unsafely-without-email"
|
||||
fi
|
||||
|
||||
if [ -n "$DOMAIN" ]; then
|
||||
|
||||
# Request certificate
|
||||
certbot certonly --standalone \
|
||||
--non-interactive --agree-tos --http-01-port=380 \
|
||||
--register-unsafely-without-email \
|
||||
"$CERTBOT_OPTS" \
|
||||
--cert-name "$DOMAIN" \
|
||||
-d "$DOMAIN"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user